Skip to content

Commit 1e2ca38

Browse files
fix /updates showing wrong 'current version' time
1 parent 077463b commit 1e2ca38

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fCraft/Commands/MaintenanceCommands.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using fCraft.AutoRank;
88
using JetBrains.Annotations;
99
using System.Diagnostics;
10+
using System.Reflection;
1011

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

13491350
static void UpdatesHandler(Player player, CommandReader cmd) {
13501351
DateTime latest = DateTime.UtcNow;
1351-
DateTime current = File.GetLastWriteTimeUtc(Process.GetCurrentProcess().MainModule.FileName);
1352-
1352+
string path = Assembly.GetExecutingAssembly().Location;
1353+
DateTime current = File.GetLastWriteTimeUtc(path);
1354+
13531355
try {
13541356
Uri uri = new Uri("https://123DMWM.tk/ProCraft/Builds/Latest.zip?");
13551357
HttpWebRequest request = HttpUtil.CreateRequest(uri, TimeSpan.FromSeconds(10));

0 commit comments

Comments
 (0)