Fix installer not overwriting files
This commit is contained in:
@ -43,7 +43,16 @@ namespace RageCoop.Client.Installer
|
||||
};
|
||||
if (od.ShowDialog() ?? false == true)
|
||||
{
|
||||
Task.Run(() => Install(Directory.GetParent(od.FileName).FullName));
|
||||
Task.Run(() => {
|
||||
try
|
||||
{
|
||||
Install(Directory.GetParent(od.FileName).FullName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Installation failed: " + ex.ToString());
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -147,7 +156,7 @@ namespace RageCoop.Client.Installer
|
||||
foreach (DirectoryInfo dir in source.GetDirectories())
|
||||
CopyFilesRecursively(dir, target.CreateSubdirectory(dir.Name));
|
||||
foreach (FileInfo file in source.GetFiles())
|
||||
file.CopyTo(Path.Combine(target.FullName, file.Name));
|
||||
file.CopyTo(Path.Combine(target.FullName, file.Name),true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user