pull/5370/head
bunsenstraat 3 years ago
parent 5b4b3d5170
commit 1a021b1488
  1. 4
      apps/remix-ide/src/app/files/fileManager.js
  2. 1
      apps/remix-ide/src/app/files/fileProvider.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) {

@ -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))
}

Loading…
Cancel
Save