mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 09:59:47 -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:
@@ -720,7 +720,7 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
|
||||
let result = await this._proxy.$getNavigation(handle, uri);
|
||||
if (result) {
|
||||
if (result.next.scheme === Schemas.untitled) {
|
||||
let untitledNbName: URI = URI.parse(`untitled:${result.next.path}`);
|
||||
let untitledNbName: URI = URI.parse(`untitled:${path.basename(result.next.path)}`);
|
||||
let content = await this._fileService.readFile(URI.file(result.next.path));
|
||||
await this.doOpenEditor(untitledNbName, { initialContent: content.value.toString(), initialDirtyState: false });
|
||||
}
|
||||
@@ -733,7 +733,7 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
|
||||
let result = await this._proxy.$getNavigation(handle, uri);
|
||||
if (result) {
|
||||
if (result.previous.scheme === Schemas.untitled) {
|
||||
let untitledNbName: URI = URI.parse(`untitled:${result.previous.path}`);
|
||||
let untitledNbName: URI = URI.parse(`untitled:${path.basename(result.previous.path)}`);
|
||||
let content = await this._fileService.readFile(URI.file(result.previous.path));
|
||||
await this.doOpenEditor(untitledNbName, { initialContent: content.value.toString(), initialDirtyState: false });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user