summaryrefslogtreecommitdiffstats
path: root/lib/models
diff options
context:
space:
mode:
Diffstat (limited to 'lib/models')
-rw-r--r--lib/models/fs.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/models/fs.js b/lib/models/fs.js
index c74f3cd..f124da8 100644
--- a/lib/models/fs.js
+++ b/lib/models/fs.js
@@ -46,7 +46,8 @@ FS.prototype.isInScope = function(filename) {
FS.prototype.resolve = function() {
var rootPath = this.getRoot();
var args = Array.prototype.slice.call(arguments);
- var filename = path.resolve.apply(path, [rootPath].concat(args));
+ var filename = path.join.apply(path, [rootPath].concat(args));
+ filename = path.normalize(filename);
if (!this.isInScope(filename)) {
throw error.FileOutOfScopeError({