mirror of
https://github.com/ZuneDev/ZuneModdingHelper.git
synced 2026-07-27 13:12:21 -07:00
Prevented overwriting of backups when reapplying mod
This commit is contained in:
@@ -34,8 +34,12 @@ namespace ZuneModCore.Mods
|
||||
return Task.FromResult<string?>($"The file '{zsDllInfo.FullName}' does not exist.");
|
||||
}
|
||||
|
||||
// Make a backup of the file
|
||||
File.Copy(zsDllInfo.FullName, Path.Combine(StorageDirectory, "ZuneService.original.dll"), true);
|
||||
// Make a backup if it doesn't already exist
|
||||
FileInfo zsDllBackupInfo = new(Path.Combine(StorageDirectory, "ZuneService.original.dll"));
|
||||
if (zsDllBackupInfo.Exists)
|
||||
{
|
||||
File.Copy(zsDllInfo.FullName, zsDllBackupInfo.FullName, true);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user