Skip to content

Commit

Permalink
Merge pull request #9 from anup-sr/master
Browse files Browse the repository at this point in the history
Fixed issue with paths not working on Windows OS
  • Loading branch information
wodka committed Mar 15, 2016
2 parents 663c9ea + fa1d212 commit de94c1d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ var ROOT = __dirname + '/';
/**
* set the current file in given path to name
*
* @param path
* @param srcPath
* @param name
*
* @returns {string}
*/
function changeFile (path, name) {
var parts = path.split('/');
function changeFile (srcPath, name) {
var path = require('path');
var parts = srcPath.split(path.sep);
parts.pop();
parts.push(name);
return parts.join('/');
return parts.join(path.sep);
}

/**
Expand Down

0 comments on commit de94c1d

Please sign in to comment.