Skip to content

Commit

Permalink
Fix GetVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Sep 16, 2024
1 parent 0a9bbf5 commit 885f193
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions v2rayN/ServiceLib/Common/Utils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -567,13 +567,12 @@ public static string GetVersion(bool blFull = true)
{
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
{
Expand All @@ -593,7 +592,7 @@ public static string GetVersionInfo()
{
try
{
return Assembly.GetExecutingAssembly()?.GetName()?.Version?.ToString() ?? "0.0";
return Assembly.GetExecutingAssembly()?.GetName()?.Version?.ToString(3) ?? "0.0";
}
catch (Exception ex)
{
Expand Down

0 comments on commit 885f193

Please sign in to comment.