mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
fix get parent
This commit is contained in:
@ -145,8 +145,8 @@ export class FtpTreeDataProvider implements TreeDataProvider<FtpNode>, TextDocum
|
||||
}
|
||||
|
||||
public getParent(element: FtpNode): FtpNode {
|
||||
const parent = vscode.Uri.parse(dirname(element.resource.fsPath));
|
||||
return parent.fsPath !== this.model.host ? { resource: parent, isDirectory: true } : null;
|
||||
const parent = element.resource.with({ path: dirname(element.resource.path) });
|
||||
return parent.path !== '//' ? { resource: parent, isDirectory: true } : null;
|
||||
}
|
||||
|
||||
public provideTextDocumentContent(uri: Uri, token: CancellationToken): ProviderResult<string> {
|
||||
|
||||
Reference in New Issue
Block a user