Skip to content

Commit 380293a

Browse files
committed
Fix config name check on windows
1 parent 27c4990 commit 380293a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/commands/generateSourcekitConfiguration.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
import { join } from "path";
15+
import { basename, dirname, join } from "path";
1616
import * as vscode from "vscode";
1717
import { FolderContext } from "../FolderContext";
1818
import { selectFolder } from "../ui/SelectFolderQuickPick";
@@ -187,7 +187,10 @@ export async function handleSchemaUpdate(
187187
) {
188188
if (
189189
!configuration.checkLspConfigurationSchema ||
190-
!doc.uri.fsPath.endsWith("/.sourcekit-lsp/config.json")
190+
!(
191+
basename(dirname(doc.uri.fsPath)) === ".sourcekit-lsp" &&
192+
basename(doc.uri.fsPath) === "config.json"
193+
)
191194
) {
192195
return;
193196
}

0 commit comments

Comments
 (0)