From 3836019bc384b3d7e3d4d1e28da6eabaab25da74 Mon Sep 17 00:00:00 2001 From: wangyw15 Date: Sun, 5 May 2024 00:57:23 +0800 Subject: [PATCH] Automatically backup original files --- AssemblyPatcher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AssemblyPatcher.cs b/AssemblyPatcher.cs index 534be91..7c2dd7e 100644 --- a/AssemblyPatcher.cs +++ b/AssemblyPatcher.cs @@ -100,7 +100,7 @@ public static void ReplaceFile(string cevioInstallPath) var targetPath = Path.Combine(cevioInstallPath, TARGET_FILE); var process = new Process(); process.StartInfo.FileName = "cmd.exe"; - process.StartInfo.Arguments = $"/c \"timeout 1 /nobreak & copy /y \"{sourcePath}\" \"{targetPath}\" & del \"{sourcePath}\" & echo Completed & pause\""; + process.StartInfo.Arguments = $"/c \"timeout 1 /nobreak & copy /y \"{targetPath}\" \"{targetPath}.bak\" & copy /y \"{sourcePath}\" \"{targetPath}\" & del \"{sourcePath}\" & echo Completed & pause\""; process.StartInfo.UseShellExecute = false; process.Start(); }