Skip to content

Commit

Permalink
change order of execution in unixify
Browse files Browse the repository at this point in the history
to ensure that characters are unescaped before fixing forward slashes
  • Loading branch information
jonschlinkert committed Oct 21, 2017
1 parent d821a08 commit 6325b5d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/utils.js
Expand Up @@ -296,17 +296,17 @@ utils.value = function(str, unixify, options) {
*/

utils.unixify = function(options) {
options = options || {};
var opts = options || {};
return function(filepath) {
if (utils.isWindows() || options.unixify === true) {
filepath = utils.toPosixPath(filepath);
}
if (options.stripPrefix !== false) {
if (opts.stripPrefix !== false) {
filepath = utils.stripPrefix(filepath);
}
if (options.unescape === true) {
if (opts.unescape === true) {
filepath = utils.unescape(filepath);
}
if (opts.unixify === true || utils.isWindows()) {
filepath = utils.toPosixPath(filepath);
}
return filepath;
};
};

0 comments on commit 6325b5d

Please sign in to comment.