Skip to content
Permalink
Browse files

fix /updates showing wrong 'current version' time

  • Loading branch information...
UnknownShadow200 committed Sep 7, 2018
1 parent 077463b commit 1e2ca38d8fead6ca4872a7b30590fd7b80344f2b
Showing with 4 additions and 2 deletions.
  1. +4 −2 fCraft/Commands/MaintenanceCommands.cs
@@ -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>
@@ -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));

0 comments on commit 1e2ca38

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