diff --git a/apps/remix-ide/src/app/files/fileManager.js b/apps/remix-ide/src/app/files/fileManager.js index 011f649de8..5265885909 100644 --- a/apps/remix-ide/src/app/files/fileManager.js +++ b/apps/remix-ide/src/app/files/fileManager.js @@ -121,12 +121,12 @@ class FileManager extends Plugin { * @param {string} path path of the directory or file * @returns {boolean} true if the path exists */ - exists (path) { + async exists (path) { try { path = this.normalize(path) path = this.limitPluginScope(path) const provider = this.fileProviderOf(path) - const result = provider.exists(path) + const result = await provider.exists(path) return result } catch (e) { diff --git a/apps/remix-ide/src/app/files/fileProvider.js b/apps/remix-ide/src/app/files/fileProvider.js index 8038814b11..4f4d731baa 100644 --- a/apps/remix-ide/src/app/files/fileProvider.js +++ b/apps/remix-ide/src/app/files/fileProvider.js @@ -80,6 +80,7 @@ class FileProvider { async _exists (path) { path = this.getPathFromUrl(path) || path // ensure we actually use the normalized path from here var unprefixedpath = this.removePrefix(path) + console.log(this.addSlash(unprefixedpath)) return path === this.type ? true : await window.remixFileSystem.exists(this.addSlash(unprefixedpath)) }