File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
arduino-ide-extension/src/node Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -52,14 +52,16 @@ export class SketchesServiceImpl implements SketchesService {
52
52
const uris : string [ ] = [ ] ;
53
53
const fsPath = FileUri . fsPath ( uri ) ;
54
54
const stats = fs . lstatSync ( fsPath ) ;
55
- if ( stats . isDirectory && await this . isSketchFolder ( uri ) ) {
56
- const fileNames = fs . readdirSync ( fsPath ) ;
57
- for ( const fileName of fileNames ) {
58
- const filePath = path . join ( fsPath , fileName ) ;
59
- if ( ALLOWED_FILE_EXTENSIONS . indexOf ( path . extname ( filePath ) ) !== - 1
60
- && fs . existsSync ( filePath )
61
- && fs . lstatSync ( filePath ) . isFile ( ) ) {
62
- uris . push ( FileUri . create ( filePath ) . toString ( ) )
55
+ if ( stats . isDirectory ) {
56
+ if ( await this . isSketchFolder ( uri ) ) {
57
+ const fileNames = fs . readdirSync ( fsPath ) ;
58
+ for ( const fileName of fileNames ) {
59
+ const filePath = path . join ( fsPath , fileName ) ;
60
+ if ( ALLOWED_FILE_EXTENSIONS . indexOf ( path . extname ( filePath ) ) !== - 1
61
+ && fs . existsSync ( filePath )
62
+ && fs . lstatSync ( filePath ) . isFile ( ) ) {
63
+ uris . push ( FileUri . create ( filePath ) . toString ( ) )
64
+ }
63
65
}
64
66
}
65
67
return uris ;
You can’t perform that action at this time.
0 commit comments