Fixed exists callback bug

pull/1140/head
ioedeveloper 4 years ago
parent 8dfeb658a9
commit 3a1a03a85c
  1. 5
      apps/remix-ide/src/app/files/fileManager.js
  2. 1
      apps/remix-ide/src/app/files/fileProvider.js

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

Loading…
Cancel
Save