|
|
@ -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 { |
|
|
|
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 |
|
|
|