Browse Source

Get plugin working.

Ian Rose 8 years ago
parent
commit
6776d462a3
2 changed files with 3 additions and 1 deletions
  1. 1 0
      packages/filebrowser-extension/src/index.ts
  2. 2 1
      packages/filebrowser/src/model.ts

+ 1 - 0
packages/filebrowser-extension/src/index.ts

@@ -126,6 +126,7 @@ function activateFactory(app: JupyterLab, docManager: IDocumentManager, state: I
     createFileBrowser(id: string, options: IFileBrowserFactory.IOptions = {}): FileBrowser {
       const model = new FileBrowserModel({
         manager: options.documentManager || docManager,
+        driveName: options.driveName || '',
         state: options.state === null ? null : options.state || state
       });
       const widget = new FileBrowser({

+ 2 - 1
packages/filebrowser/src/model.ts

@@ -259,8 +259,9 @@ class FileBrowserModel implements IDisposable {
       }
 
       const path = cwd['path'] as string;
+      const localPath = path.split(':').pop();
       return manager.services.contents.get(path)
-        .then(() => this.cd(path))
+        .then(() => this.cd(localPath))
         .catch(() => state.remove(key));
     }).catch(() => state.remove(key))
       .then(() => { this._key = key; }); // Set key after restoration is done.