make forward slash in output path consistent

This commit is contained in:
jmbeach
2022-02-02 14:59:58 -05:00
parent 52e971f615
commit 891dbce95c
3 changed files with 24 additions and 0 deletions
+6
View File
@@ -61,6 +61,12 @@ export class ObfuscatedCodeFileUtils {
if (isDirectoryRawInputPath) {
if (isDirectoryRawOutputPath) {
const parsedNormalizedFilePath: path.ParsedPath = path.parse(normalizedFilePath);
// Make ending with "/" consistent
if (!parsedNormalizedFilePath.dir.endsWith('/') && this.inputPath.endsWith('/')) {
parsedNormalizedFilePath.dir += '/';
}
const baseOutputPath: string = path.join(
parsedNormalizedFilePath.dir.replace(this.inputPath, ''),
parsedNormalizedFilePath.base