Commit 3a1a03a8 authored by ioedeveloper's avatar ioedeveloper

Fixed exists callback bug

parent 8dfeb658
...@@ -121,10 +121,7 @@ class FileManager extends Plugin { ...@@ -121,10 +121,7 @@ class FileManager extends Plugin {
try { try {
path = this.limitPluginScope(path) path = this.limitPluginScope(path)
const provider = this.fileProviderOf(path) const provider = this.fileProviderOf(path)
const result = provider.exists(path, (err, result) => { const result = provider.exists(path, () => {})
if (err) return false
return result
})
return result return result
} catch (e) { } catch (e) {
......
...@@ -67,6 +67,7 @@ class FileProvider { ...@@ -67,6 +67,7 @@ class FileProvider {
// todo check the type (directory/file) as well #2386 // todo check the type (directory/file) as well #2386
// currently it is not possible to have a file and folder with same path // currently it is not possible to have a file and folder with same path
const ret = this._exists(path) const ret = this._exists(path)
if (cb) cb(null, ret)
return ret return ret
} }
......
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