소스 검색

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;