Commit c6e642af authored by yann300's avatar yann300

fix basicReadOnlyExplorer

parent c74eff01
...@@ -27,7 +27,8 @@ class BasicReadOnlyExplorer { ...@@ -27,7 +27,8 @@ class BasicReadOnlyExplorer {
} }
get (path, cb) { get (path, cb) {
var content = this.files[path] var unprefixedPath = this.removePrefix(path)
var content = this.files[unprefixedPath]
if (!content) { if (!content) {
content = this.files[this.type + '/' + this.normalizedNames[path]] content = this.files[this.type + '/' + this.normalizedNames[path]]
} }
...@@ -48,6 +49,7 @@ class BasicReadOnlyExplorer { ...@@ -48,6 +49,7 @@ class BasicReadOnlyExplorer {
try { // lazy try to format JSON try { // lazy try to format JSON
content = JSON.stringify(JSON.parse(content), null, '\t') content = JSON.stringify(JSON.parse(content), null, '\t')
} catch (e) {} } catch (e) {}
if (!rawPath) rawPath = path
// splitting off the path in a tree structure, the json tree is used in `resolveDirectory` // splitting off the path in a tree structure, the json tree is used in `resolveDirectory`
var split = path var split = path
var folder = false var folder = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment