Jelajahi Sumber

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 tahun lalu
induk
melakukan
5d815e37d1
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  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;