-
Notifications
You must be signed in to change notification settings - Fork 34.5k
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insiderssimple-file-dialogIssues with simple file dialogIssues with simple file dialogverifiedVerification succeededVerification succeeded
Milestone
Description
Issue Type: Bug
The problem seems to lie in this code:
vscode/src/vs/workbench/services/dialogs/browser/simpleFileDialog.ts
Lines 213 to 224 in 79e9194
private remoteUriFrom(path: string): URI { | |
if (!path.startsWith('\\\\')) { | |
path = path.replace(/\\/g, '/'); | |
} | |
const uri: URI = this.scheme === Schemas.file ? URI.file(path) : URI.from({ scheme: this.scheme, path }); | |
// If the default scheme is file, then we don't care about the remote authority | |
const authority = uri.scheme === Schemas.file ? undefined : this.remoteAuthority; | |
return resources.toLocalResource(uri, authority, | |
// If there is a remote authority, then we should use the system's default URI as the local scheme. | |
// If there is *no* remote authority, then we should use the default scheme for this dialog as that is already local. | |
authority ? this.pathService.defaultUriScheme : uri.scheme); | |
} |
When the workspace is a local one, this.remoteAuthority
is undefined, so the returned uri has authority: ''
I intend to prepare a variant of the MemFS sample to demonstrate the problem.
VS Code version: Code - Insiders 1.59.0-insider (0448522, 2021-07-23T19:21:12.120Z)
OS version: Windows_NT x64 10.0.19043
Restricted Mode: No
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginsiders-releasedPatch has been released in VS Code InsidersPatch has been released in VS Code Insiderssimple-file-dialogIssues with simple file dialogIssues with simple file dialogverifiedVerification succeededVerification succeeded