From 4145863d10edad84bf71f61b4adb39b55f00fe50 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 8 Feb 2018 18:43:22 +0100 Subject: [PATCH] fix basicReadOnlyExplorer --- src/app/files/basicReadOnlyExplorer.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/files/basicReadOnlyExplorer.js b/src/app/files/basicReadOnlyExplorer.js index a9178702ab..48a8841e1e 100644 --- a/src/app/files/basicReadOnlyExplorer.js +++ b/src/app/files/basicReadOnlyExplorer.js @@ -27,7 +27,8 @@ class BasicReadOnlyExplorer { } get (path, cb) { - var content = this.files[path] + var unprefixedPath = this.removePrefix(path) + var content = this.files[unprefixedPath] if (!content) { content = this.files[this.type + '/' + this.normalizedNames[path]] } @@ -48,6 +49,7 @@ class BasicReadOnlyExplorer { try { // lazy try to format JSON content = JSON.stringify(JSON.parse(content), null, '\t') } catch (e) {} + if (!rawPath) rawPath = path // splitting off the path in a tree structure, the json tree is used in `resolveDirectory` var split = path var folder = false