Update to ADO 5ed9b2130da7f822153531489d802c28986f5d30

This commit is contained in:
Steve Faulkner
2020-05-26 13:53:41 -05:00
parent 36581fb6d9
commit 0494da4162
42 changed files with 1186 additions and 2242 deletions

View File

@@ -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)