Skip to content

Commit

Permalink
Always use posix style
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Oct 17, 2024
1 parent 50f5f47 commit 40ff08e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/TemplatePath.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ TemplatePath.getAllDirs = function (path) {
* @returns {String} the normalized path.
*/
TemplatePath.normalize = function (thePath) {
let filePath = path.normalize(thePath);
if(filePath !== path.sep && filePath.endsWith(path.sep)) {
return filePath.slice(0, -1 * path.sep.length);
let filePath = path.normalize(thePath).split(path.sep).join("/");
if(filePath !== path.sep && filePath.endsWith("/")) {
return filePath.slice(0, -1);
}
return filePath;
};
Expand Down

0 comments on commit 40ff08e

Please sign in to comment.