Fixed creating new project over an existing one doesn't replaces the old one

Closes #16
This commit is contained in:
Thorsten Sommer 2022-07-09 21:02:08 +02:00
parent ff87378012
commit 1d7e1db8e5
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -110,6 +110,12 @@ public partial class LoaderStart : UserControl
return;
var destinationFilePath = saveDialog.FileName;
// When the user chose an existing file, we delete it:
// (note: the user already accepts overwriting the file)
if (File.Exists(destinationFilePath))
File.Delete(destinationFilePath);
LoaderStart.UpdateRecentProjectsWithPruning(destinationFilePath);
this.OpenProject(destinationFilePath);
}