Skip to content

Commit

Permalink
fix /updates showing wrong 'current version' time
Browse files Browse the repository at this point in the history
  • Loading branch information
UnknownShadow200 committed Sep 7, 2018
1 parent 077463b commit 1e2ca38
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fCraft/Commands/MaintenanceCommands.cs
Expand Up @@ -7,6 +7,7 @@
using fCraft.AutoRank;
using JetBrains.Annotations;
using System.Diagnostics;
using System.Reflection;

namespace fCraft {
/// <summary> Several yet-undocumented commands, mostly related to AutoRank. </summary>
Expand Down Expand Up @@ -1348,8 +1349,9 @@ static void SaveHandler(Player player, CommandReader cmd)

static void UpdatesHandler(Player player, CommandReader cmd) {
DateTime latest = DateTime.UtcNow;
DateTime current = File.GetLastWriteTimeUtc(Process.GetCurrentProcess().MainModule.FileName);

string path = Assembly.GetExecutingAssembly().Location;
DateTime current = File.GetLastWriteTimeUtc(path);

try {
Uri uri = new Uri("https://123DMWM.tk/ProCraft/Builds/Latest.zip?");
HttpWebRequest request = HttpUtil.CreateRequest(uri, TimeSpan.FromSeconds(10));
Expand Down

0 comments on commit 1e2ca38

Please sign in to comment.