mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 11:08:51 +01:00
remote - use posix.dirname of uri.path
This commit is contained in:
@@ -8,7 +8,7 @@ import URI from 'vs/base/common/uri';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { normalize } from 'vs/base/common/paths';
|
||||
import { delta as arrayDelta } from 'vs/base/common/arrays';
|
||||
import { relative, dirname } from 'path';
|
||||
import { relative, posix } from 'path';
|
||||
import { Workspace, WorkspaceFolder } from 'vs/platform/workspace/common/workspace';
|
||||
import { IWorkspaceData, ExtHostWorkspaceShape, MainContext, MainThreadWorkspaceShape, IMainContext, MainThreadMessageServiceShape } from './extHost.protocol';
|
||||
import * as vscode from 'vscode';
|
||||
@@ -121,7 +121,7 @@ class ExtHostWorkspaceImpl extends Workspace {
|
||||
getWorkspaceFolder(uri: URI, resolveParent?: boolean): vscode.WorkspaceFolder {
|
||||
if (resolveParent && this._structure.get(uri.toString())) {
|
||||
// `uri` is a workspace folder so we check for its parent
|
||||
uri = uri.with({ path: dirname(uri.path) });
|
||||
uri = uri.with({ path: posix.dirname(uri.path) });
|
||||
}
|
||||
return this._structure.findSubstr(uri.toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user