diff --git a/extensions/notebook/src/book/bookTreeItem.ts b/extensions/notebook/src/book/bookTreeItem.ts index 6fc19bdcce..0c3927f2e1 100644 --- a/extensions/notebook/src/book/bookTreeItem.ts +++ b/extensions/notebook/src/book/bookTreeItem.ts @@ -82,7 +82,7 @@ export class BookTreeItem extends vscode.TreeItem { } this._rootContentPath = getContentPath(this.book.version, this.book.root, ''); this.tooltip = this.book.type === BookTreeItemType.Book ? this._rootContentPath : this.book.contentPath; - this.resourceUri = vscode.Uri.file(this.book.root); + this.resourceUri = this.book.type === BookTreeItemType.Book ? vscode.Uri.file(this.book.root) : vscode.Uri.file(this.book.contentPath); } } diff --git a/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet.ts b/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet.ts index fa610216aa..c546ae6498 100644 --- a/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet.ts +++ b/src/sql/workbench/contrib/notebook/browser/notebookExplorer/notebookExplorerViewlet.ts @@ -291,7 +291,7 @@ export class NotebookExplorerViewPaneContainer extends ViewPaneContainer { filesToIncludeFiltered = filesToIncludeFiltered + path.join(folderToSearch.folder.fsPath, '**', '*.md') + ',' + path.join(folderToSearch.folder.fsPath, '**', '*.ipynb') + ','; } else { let pattern = {}; - let rootFolder = URI.file(root.resourceUri.path); + let rootFolder = URI.file(path.dirname(root.resourceUri.path)); let pathToNotebook = isString(root.tooltip) ? root.tooltip : root.tooltip.value; let baseName = path.join('**', path.basename(pathToNotebook)); pattern[baseName] = true;