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

Commit fa069eca by Andre Cerqueira

use path.resolve instead of url.resolve for local file path

1 parent e7c8f265
Showing with 2 additions and 1 deletions
var url = require("url") var url = require("url")
, Path = require("path")
, Utils = require("./utils") , Utils = require("./utils")
, DAOFactory = require("./dao-factory") , DAOFactory = require("./dao-factory")
, DataTypes = require('./data-types') , DataTypes = require('./data-types')
...@@ -219,7 +220,7 @@ module.exports = (function() { ...@@ -219,7 +220,7 @@ module.exports = (function() {
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 = url.resolve(callerFilename, path); path = Path.resolve(callerFilename, 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!