mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-21 09:51:11 +00:00
Update to ADO 5ed9b2130da7f822153531489d802c28986f5d30
This commit is contained in:
@@ -141,8 +141,7 @@ export class NotebookContentClient implements ViewModels.INotebookContentClient
|
||||
targetName += extension;
|
||||
}
|
||||
}
|
||||
const parsedPath = NotebookContentClient.parsePath(sourcePath);
|
||||
const targetPath = `${parsedPath.dirpath}${targetName}`;
|
||||
const targetPath = NotebookUtil.replaceName(sourcePath, targetName);
|
||||
return this.contentProvider
|
||||
.update<"file" | "notebook" | "directory">(this.getServerConfig(), sourcePath, { path: targetPath })
|
||||
.toPromise()
|
||||
@@ -214,21 +213,6 @@ export class NotebookContentClient implements ViewModels.INotebookContentClient
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param path
|
||||
* @returns basename and dirpath. Note: dirpath has trailing / already
|
||||
*/
|
||||
private static parsePath(path: string): { dirpath: string; basename: string } {
|
||||
const basename = path.split("/").pop();
|
||||
const dirpath = path.split(basename).shift();
|
||||
|
||||
return {
|
||||
dirpath,
|
||||
basename
|
||||
};
|
||||
}
|
||||
|
||||
private deleteNotebookFile(path: string): Promise<string> {
|
||||
return this.contentProvider
|
||||
.remove(this.getServerConfig(), path)
|
||||
|
||||
Reference in New Issue
Block a user