mirror of
https://github.com/javascript-obfuscator/javascript-obfuscator
synced 2026-08-09 12:42:29 +00:00
Fixed wrong name of obfuscated files when input directory path is the . symbol
https://github.com/javascript-obfuscator/javascript-obfuscator/issues/816
This commit is contained in:
@@ -60,7 +60,11 @@ export class ObfuscatedCodeWriter {
|
||||
|
||||
if (isDirectoryRawInputPath) {
|
||||
if (isDirectoryRawOutputPath) {
|
||||
const baseOutputPath: string = normalizedFilePath.replace(this.inputPath, '');
|
||||
const parsedNormalizedFilePath: path.ParsedPath = path.parse(normalizedFilePath);
|
||||
const baseOutputPath: string = path.join(
|
||||
parsedNormalizedFilePath.dir.replace(this.inputPath, ''),
|
||||
parsedNormalizedFilePath.base
|
||||
);
|
||||
|
||||
return path.join(normalizedRawOutputPath, baseOutputPath);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user