Skip to content

Commit

Permalink
server-node: Use normalize instead of resolve for paths
Browse files Browse the repository at this point in the history
  • Loading branch information
andersevenrud committed Nov 19, 2016
1 parent b514de9 commit d8f8dcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/node/core/vfs.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ module.exports.parseVirtualPath = function(query, options) {

const parts = query.split(/([A-z0-9\-_]+)\:\/\/(.*)/);
const protocol = parts[1];
const path = _path.resolve(String(parts[2]).replace(/^\/+?/, '/').replace(/^\/?/, '/'));
const path = _path.normalize(String(parts[2]).replace(/^\/+?/, '/').replace(/^\/?/, '/'));

const mount = mountpoints[protocol];
if ( !options._virtual && protocol === '$' ) {
Expand Down

0 comments on commit d8f8dcf

Please sign in to comment.