Fix Auto-Updater Not Working If .bak File Exists

This commit is contained in:
Alan Moon 2025-07-06 15:36:15 -07:00
parent 846a477587
commit 922528c61c

View File

@ -68,6 +68,9 @@ namespace qtc_net_client_2.Services
try try
{ {
// if bak file already exists, delete it
if (File.Exists($"/{updateInfo.ClientFileName}.bak")) File.Delete($"/{updateInfo.ClientFileName}.bak");
// move old client to backup file // move old client to backup file
File.Move($"./{updateInfo.ClientFileName}", $"{updateInfo.ClientFileName}.bak"); File.Move($"./{updateInfo.ClientFileName}", $"{updateInfo.ClientFileName}.bak");