From 40ff08e387ea9a3b428da3a9c2ef662b67981790 Mon Sep 17 00:00:00 2001 From: Zach Leatherman Date: Thu, 17 Oct 2024 16:26:15 -0500 Subject: [PATCH] Always use posix style --- src/TemplatePath.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TemplatePath.js b/src/TemplatePath.js index fb77249..c28110d 100644 --- a/src/TemplatePath.js +++ b/src/TemplatePath.js @@ -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; };