Skip to content

Commit c16c2b1

Browse files
tdusnokiyichoi
authored andcommitted
Filter empty files for quickpick to be more efficient
IoT.js-VSCode-DCO-1.0-Signed-off-by: Tibor Dusnoki [email protected]
1 parent 655294b commit c16c2b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const walkSync = (dir: string, filelist: string[] = []): string[] => {
5151
: filelist.concat(path.join(dir, file));
5252
});
5353

54-
return filelist.filter(f => path.extname(f).toLowerCase().match(/\.(js)$/i) && f !== '');
54+
return filelist.filter(f => path.extname(f).toLowerCase().match(/\.(js)$/i) && f !== '' && (fs.statSync(f).size) > 0);
5555
};
5656

5757
const getListOfFiles = (): string[] => {

0 commit comments

Comments
 (0)