diff --git a/src/app/files/fileManager.js b/src/app/files/fileManager.js index e405ad6006..bd8f8d3a8c 100644 --- a/src/app/files/fileManager.js +++ b/src/app/files/fileManager.js @@ -4,6 +4,7 @@ var $ = require('jquery') var remixLib = require('remix-lib') var yo = require('yo-yo') var EventManager = remixLib.EventManager +var imports = require('../compiler/compiler-imports') /* attach to files event (removed renamed) @@ -145,8 +146,14 @@ class FileManager { fileProviderOf (file) { var provider = file.match(/[^/]*/) - if (provider !== null) { + if (provider !== null && this.opt.filesProviders[provider[0]]) { return this.opt.filesProviders[provider[0]] + } else { + for (var handler of imports.handlers()) { + if (handler.match.exec(file)) { + return this.opt.filesProviders[handler.type] + } + } } return null }