diff --git a/EZPPClient Installer/DownloadUtil.cs b/EZPPClient Installer/DownloadUtil.cs index f9d8f06..592a59f 100644 --- a/EZPPClient Installer/DownloadUtil.cs +++ b/EZPPClient Installer/DownloadUtil.cs @@ -50,6 +50,9 @@ namespace EZPPClient_Installer if (!directoryExists) { +#if DEBUG + MessageBox.Show("Folder does not exist: " + pathToEZPP); +#endif foreach (MD5File md5File in md5Files) downloadList.Add(md5File.getName()); } @@ -67,6 +70,9 @@ namespace EZPPClient_Installer { string onlineHash = md5file.getMD5(); string pcHash = MD5Util.CalculateMD5(file); +#if DEBUG + MessageBox.Show("Filename: " + md5file.getName() + "\nOnline-Hash: " + onlineHash + "\n PC-Hash: " + pcHash); +#endif if (!string.Equals(onlineHash, pcHash)) { downloadList.Add(md5file.getName()); @@ -86,7 +92,11 @@ namespace EZPPClient_Installer if (!Directory.Exists(path)) Directory.CreateDirectory(path); - foreach(string filename in files) + foreach(string file in files) + if (File.Exists(path + @"\" + file)) + File.Delete(path + @"\" + file); + + foreach (string filename in files) { await DownloadFile(filename, path); diff --git a/EZPPClient Installer/MainWindow.xaml b/EZPPClient Installer/MainWindow.xaml index 5ea1b37..6b07954 100644 --- a/EZPPClient Installer/MainWindow.xaml +++ b/EZPPClient Installer/MainWindow.xaml @@ -12,8 +12,8 @@