Unverified Commit 43da9d5e authored by Danny Tuppeny's avatar Danny Tuppeny Committed by GitHub

Use isDirectory instead of existsSync to avoid crash (#18167)

Fixes #15198.
parent 34933f80
......@@ -163,7 +163,7 @@ class VsCode {
final List<VsCode> results = <VsCode>[];
for (_VsCodeInstallLocation searchLocation in searchLocations) {
if (fs.directory(searchLocation.installPath).existsSync()) {
if (fs.isDirectorySync(searchLocation.installPath)) {
final String extensionDirectory =
fs.path.join(homeDirPath, searchLocation.extensionsFolder, 'extensions');
results.add(new VsCode.fromDirectory(searchLocation.installPath, extensionDirectory, edition: searchLocation.edition));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment