Skip to content
Permalink
Browse files

updater download fix

  • Loading branch information...
metonator committed Feb 16, 2019
1 parent c83f2da commit b78b45ffa25d53f5bb0189d7aa5bdcd4ec41a580
Showing with 6 additions and 0 deletions.
  1. +6 −0 GameLauncher/Program.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Net;
@@ -42,6 +43,11 @@ internal static class Program {
Log.Debug("Starting GameLauncherUpdater downloader");
try {
using (WebClientWithTimeout wc = new WebClientWithTimeout()) {
wc.DownloadFileCompleted += (object sender, AsyncCompletedEventArgs e) => {
if (new FileInfo("GameLauncherUpdater.exe").Length == 0) {
File.Delete("GameLauncherUpdater.exe");
}
};
wc.DownloadFileAsync(new Uri(Self.mainserver + "/files/GameLauncherUpdater.exe"), "GameLauncherUpdater.exe");
}
} catch(Exception ex) {

0 comments on commit b78b45f

Please sign in to comment.
You can’t perform that action at this time.