github
bunsenstraat 3 years ago
parent 33d5579aa8
commit b35fec019c
  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