浏览代码

filebrowser model cd handles relative paths, and item.path never starts with a root /, so add one.

Fixes #6898
Fixes an error with #6841

This lets the filebrowser browser more than one directory level deep.
Jason Grout 5 年之前
父节点
当前提交
5d815e37d1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/filebrowser/src/listing.ts

+ 1 - 1
packages/filebrowser/src/listing.ts

@@ -922,7 +922,7 @@ export class DirListing extends Widget {
     this._onItemOpened.emit(item);
     if (item.type === 'directory') {
       this._model
-        .cd(item.path)
+        .cd(`/${item.path}`)
         .catch(error => showErrorMessage('Open directory', error));
     } else {
       let path = item.path;