mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-14 18:46:34 -05:00
Book/untitled file name updates (#8579)
* file-name has entire path as name, changes to address that * await promises
This commit is contained in:
@@ -290,13 +290,8 @@ export class BookTreeViewProvider implements vscode.TreeDataProvider<BookTreeIte
|
||||
|
||||
getUntitledNotebookUri(resource: string): vscode.Uri {
|
||||
let untitledFileName: vscode.Uri;
|
||||
if (process.platform === 'win32') {
|
||||
let title = path.join(path.dirname(resource), this.findNextUntitledFileName(resource));
|
||||
untitledFileName = vscode.Uri.parse(`untitled:${title}`);
|
||||
}
|
||||
else {
|
||||
untitledFileName = vscode.Uri.parse(resource).with({ scheme: 'untitled' });
|
||||
}
|
||||
let nextTitle: string = this.findNextUntitledFileName(resource);
|
||||
untitledFileName = vscode.Uri.parse(`untitled:${nextTitle}`);
|
||||
if (!this.currentBook.getAllBooks().get(untitledFileName.fsPath) && !this.currentBook.getAllBooks().get(path.basename(untitledFileName.fsPath))) {
|
||||
let notebook = this.currentBook.getAllBooks().get(resource);
|
||||
this.currentBook.getAllBooks().set(path.basename(untitledFileName.fsPath), notebook);
|
||||
|
||||
Reference in New Issue
Block a user