不要怂,就是干,撸起袖子干!

Commit eb063916 by Sascha Depold

fixed path resolution

1 parent b31e5a3c
Showing with 5 additions and 2 deletions
...@@ -219,8 +219,11 @@ module.exports = (function() { ...@@ -219,8 +219,11 @@ module.exports = (function() {
// is it a relative path? // is it a relative path?
if (url.parse(path).pathname.indexOf('/') !== 0) { if (url.parse(path).pathname.indexOf('/') !== 0) {
// make path relative to the caller // make path relative to the caller
var callerFilename = Utils.stack()[1].getFileName(); var callerFilename = Utils.stack()[1].getFileName()
path = Path.resolve(callerFilename, path); , callerMatch = callerFilename.match(/(.+\/).+?$/)
, callerPath = callerMatch[1]
path = Path.resolve(callerPath, path)
} }
if (!this.importCache[path]) { if (!this.importCache[path]) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!