use safe copy file on single file updating

This commit is contained in:
Pilzinsel64
2024-09-04 11:24:20 +02:00
parent 98d6d4d60a
commit 16a96329b5
2 changed files with 31 additions and 26 deletions

View File

@@ -190,7 +190,7 @@ public class UpdateClient(string updateUrl, AppVersion currentVersion, AppChanne
Utils.CopyFiles(dataPathDir, destDir);
}
else if (package.UpdateType == UpdateType.File)
File.Copy(dataPath, localInstallPath);
Utils.CopyFile(new FileInfo(dataPath), new FileInfo(localInstallPath));
RaiseStatusChanged(UpdateStatus.Copying, UpdateStatusEvent.PostEvent);
// Delete Package