Do not suggest dot files in html/css. Fix #46780

This commit is contained in:
Pine Wu
2018-09-18 11:38:09 -07:00
parent 9040bf6802
commit 39fbbf02c4
6 changed files with 37 additions and 7 deletions

View File

@@ -78,11 +78,12 @@ function providePaths(valueBeforeCursor: string, activeDocFsPath: string, root?:
}
try {
return fs.readdirSync(parentDir).map(f => {
const paths = fs.readdirSync(parentDir).map(f => {
return isDir(path.resolve(parentDir, f))
? f + '/'
: f;
});
return paths.filter(p => p[0] !== '.');
} catch (e) {
return [];
}