mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
[css] .asar file breaks CSS path completion. Fixes #46638
This commit is contained in:
@@ -82,7 +82,7 @@ function providePaths(valueBeforeCursor: string, activeDocFsPath: string, root?:
|
||||
|
||||
try {
|
||||
return fs.readdirSync(parentDir).map(f => {
|
||||
return fs.statSync(path.resolve(parentDir, f)).isDirectory()
|
||||
return isDir(path.resolve(parentDir, f))
|
||||
? f + '/'
|
||||
: f;
|
||||
});
|
||||
@@ -91,6 +91,14 @@ function providePaths(valueBeforeCursor: string, activeDocFsPath: string, root?:
|
||||
}
|
||||
}
|
||||
|
||||
function isDir(p: string) {
|
||||
try {
|
||||
return fs.statSync(p).isDirectory();
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function pathToSuggestion(p: string, valueBeforeCursor: string, fullValue: string, range: Range): CompletionItem {
|
||||
const isDir = p[p.length - 1] === '/';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user