Skip to content

Commit

Permalink
Fix schema matching against vscode-remote
Browse files Browse the repository at this point in the history
Fixes #1104.
  • Loading branch information
code-asher committed Oct 29, 2019
1 parent 2f0878d commit 7e4a73c
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions scripts/vscode.patch
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,34 @@ index 84c46faa36..957e8412e1 100644

if (!this.configuration.userDataProvider) {
const remoteUserDataUri = this.getRemoteUserDataUri();
diff --git a/src/vs/workbench/common/resources.ts b/src/vs/workbench/common/resources.ts
index 53de865d8f..df234821a9 100644
--- a/src/vs/workbench/common/resources.ts
+++ b/src/vs/workbench/common/resources.ts
@@ -15,6 +15,7 @@ import { ParsedExpression, IExpression, parse } from 'vs/base/common/glob';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
import { withNullAsUndefined } from 'vs/base/common/types';
+import { Schemas } from 'vs/base/common/network';

export class ResourceContextKey extends Disposable implements IContextKey<URI> {

@@ -63,7 +64,7 @@ export class ResourceContextKey extends Disposable implements IContextKey<URI> {
set(value: URI | null) {
if (!ResourceContextKey._uriEquals(this._resourceKey.get(), value)) {
this._resourceKey.set(value);
- this._schemeKey.set(value ? value.scheme : null);
+ this._schemeKey.set(value ? (value.scheme === Schemas.vscodeRemote ? Schemas.file : value.scheme) : null);
this._filenameKey.set(value ? basename(value) : null);
this._langIdKey.set(value ? this._modeService.getModeIdByFilepathOrFirstLine(value) : null);
this._extensionKey.set(value ? extname(value) : null);
@@ -200,4 +201,4 @@ export class ResourceGlobMatcher extends Disposable {

return !!expressionForRoot(resourcePathToMatch);
}
-}
\ No newline at end of file
+}
diff --git a/src/vs/workbench/contrib/files/browser/files.contribution.ts b/src/vs/workbench/contrib/files/browser/files.contribution.ts
index 1f4cd95f65..061931cbde 100644
--- a/src/vs/workbench/contrib/files/browser/files.contribution.ts
Expand Down

0 comments on commit 7e4a73c

Please sign in to comment.