From 8e922468c507a01f0bafb36196ef6aad709f9611 Mon Sep 17 00:00:00 2001 From: Yoshi Askharoun Date: Wed, 16 Jul 2025 23:00:24 -0500 Subject: [PATCH] Don't overwrite original files --- UIXC/Commands/DecompileCommand.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/UIXC/Commands/DecompileCommand.cs b/UIXC/Commands/DecompileCommand.cs index 3db669a..bf0e6f0 100644 --- a/UIXC/Commands/DecompileCommand.cs +++ b/UIXC/Commands/DecompileCommand.cs @@ -146,8 +146,9 @@ public class DecompileCommand : CompilerCommandBase private static string GetOutputPath(Settings settings, string inputFilePath) { - var fileName = Path.GetFileName(inputFilePath);//.Replace('!', '/'); - var outputFile = Path.Combine(settings.OutputDir, Path.ChangeExtension(fileName, settings.Language.GetExtension())); + var fileName = Path.GetFileNameWithoutExtension(inputFilePath);//.Replace('!', '/'); + var newFileName = $"{fileName}_decomp{settings.Language.GetExtension()}"; + var outputFile = Path.Combine(settings.OutputDir, newFileName); var outputDir = Path.GetDirectoryName(outputFile)!; Directory.CreateDirectory(outputDir);