mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Replace URL and use vscode.URI on local paths (#11624)
* Use vscode.URI for local paths * Use vscode.uri file method to set the name for remotebookfull path compressed file * Add await on extract tar function * Replace remote paths too * Use vscode.uri.file instead of parse for local paths
This commit is contained in:
@@ -8,9 +8,9 @@ import * as utils from '../common/utils';
|
||||
import { IAsset } from './remoteBookController';
|
||||
|
||||
export abstract class RemoteBook {
|
||||
protected _localPath: URL;
|
||||
protected _localPath: vscode.Uri;
|
||||
|
||||
constructor(public remotePath: URL, public outputChannel: vscode.OutputChannel, protected _asset?: IAsset) {
|
||||
constructor(public remotePath: vscode.Uri, public outputChannel: vscode.OutputChannel, protected _asset?: IAsset) {
|
||||
this.remotePath = remotePath;
|
||||
}
|
||||
|
||||
@@ -21,10 +21,10 @@ export abstract class RemoteBook {
|
||||
if (vscode.workspace.workspaceFolders !== undefined) {
|
||||
// Get workspace root path
|
||||
let folders = vscode.workspace.workspaceFolders;
|
||||
this._localPath = new URL(folders[0].uri.fsPath);
|
||||
this._localPath = vscode.Uri.file(folders[0].uri.fsPath);
|
||||
} else {
|
||||
//If no workspace folder is opened then path is Users directory
|
||||
this._localPath = new URL(utils.getUserHome());
|
||||
this._localPath = vscode.Uri.file(utils.getUserHome());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user