We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 385df2a commit 6158006Copy full SHA for 6158006
1 file changed
src/uriHandler.ts
@@ -31,7 +31,9 @@ export function isValidWorkspaceUri(uri: vscode.Uri): boolean {
31
// On Windows, valid paths have a drive letter (e.g., C:\...)
32
// On Unix, valid paths start with / followed by directory names
33
const fsPath = uri.fsPath;
34
- // Check if the path is just a number (invalid)
+ // Check if the path is just a number (invalid).
35
+ // The optional leading [/\\] handles both Unix paths (/1234) and potential Windows paths (\1234),
36
+ // though in practice fsPath typically includes a leading separator.
37
if (/^[/\\]?\d+$/.test(fsPath)) {
38
return false;
39
}
0 commit comments