From 885f193a0052149438a9c0d775772cc4eafd1180 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:34:35 +0800 Subject: [PATCH] Fix GetVersion --- v2rayN/ServiceLib/Common/Utils.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/v2rayN/ServiceLib/Common/Utils.cs b/v2rayN/ServiceLib/Common/Utils.cs index dd36758d..9830213c 100644 --- a/v2rayN/ServiceLib/Common/Utils.cs +++ b/v2rayN/ServiceLib/Common/Utils.cs @@ -567,13 +567,12 @@ namespace ServiceLib.Common { try { - string location = GetExePath(); if (blFull) { return string.Format("{0} - V{1} - {2}", Global.AppName, GetVersionInfo(), - File.GetLastWriteTime(location).ToString("yyyy/MM/dd")); + File.GetLastWriteTime(GetExePath()).ToString("yyyy/MM/dd")); } else { @@ -593,7 +592,7 @@ namespace ServiceLib.Common { try { - return Assembly.GetExecutingAssembly()?.GetName()?.Version?.ToString() ?? "0.0"; + return Assembly.GetExecutingAssembly()?.GetName()?.Version?.ToString(3) ?? "0.0"; } catch (Exception ex) {