Skip to content

Commit 6ae687f

Browse files
check if the directory exists (#7487)
1 parent 2e00bb9 commit 6ae687f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Extension/src/LanguageServer/configurations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ export class CppProperties {
10831083
return;
10841084
} else {
10851085
try {
1086-
if (!await util.checkFileExists(this.configFolder)) {
1086+
if (!await util.checkDirectoryExists(this.configFolder)) {
10871087
fs.mkdirSync(this.configFolder);
10881088
}
10891089

Extension/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<CppToo
4040
const arch: string = PlatformInformation.GetArchitecture();
4141
if (arch !== 'x64' && (process.platform !== 'win32' || (arch !== 'x86' && arch !== 'arm64')) && (process.platform !== 'linux' || (arch !== 'x64' && arch !== 'arm' && arch !== 'arm64')) && (process.platform !== 'darwin' || arch !== 'arm64')) {
4242
errMsg = localize("architecture.not.supported", "Architecture {0} is not supported. ", String(arch));
43-
} else if (process.platform === 'linux' && await util.checkFileExists('/etc/alpine-release')) {
43+
} else if (process.platform === 'linux' && await util.checkDirectoryExists('/etc/alpine-release')) {
4444
errMsg = localize("apline.containers.not.supported", "Alpine containers are not supported.");
4545
}
4646
if (errMsg) {
@@ -162,7 +162,7 @@ async function processRuntimeDependencies(): Promise<void> {
162162
// For macOS and if a user has upgraded their OS, check to see if we are on Mojave or later
163163
// and that the debugAdapters/lldb-mi folder exists. This will force a online install to get the correct binaries.
164164
if (!highSierraOrLowerRegex.test(info.version) &&
165-
!await util.checkFileExists(lldbMiFolderPath)) {
165+
!await util.checkDirectoryExists(lldbMiFolderPath)) {
166166

167167
forceOnlineInstall = true;
168168

0 commit comments

Comments
 (0)