Commit 20ce7788 authored by Alex Beregszaszi's avatar Alex Beregszaszi

Simplify files.get / files.exists

parent 124bb988
...@@ -13,11 +13,7 @@ function Files (storage) { ...@@ -13,11 +13,7 @@ function Files (storage) {
return false return false
} }
if (this.isReadOnly(path)) { return this.isReadOnly(path) || storage.exists(path)
return true
} else {
return storage.exists(path)
}
} }
this.get = function (path) { this.get = function (path) {
...@@ -26,11 +22,7 @@ function Files (storage) { ...@@ -26,11 +22,7 @@ function Files (storage) {
return null return null
} }
if (this.isReadOnly(path)) { return readonly[path] || storage.get(path)
return readonly[path]
} else {
return storage.get(path)
}
} }
this.set = function (path, content) { this.set = function (path, content) {
......
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