mirror of
https://github.com/huiyadanli/RevokeMsgPatcher.git
synced 2025-05-24 22:46:06 +08:00
[#] 修复无文件,版本判断报错
This commit is contained in:
parent
1b735b5703
commit
79f5098b02
|
@ -16,8 +16,16 @@ namespace RevokeMsgPatcher.Utils
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string GetFileVersion(string path)
|
public static string GetFileVersion(string path)
|
||||||
{
|
{
|
||||||
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(path);
|
if (File.Exists(path))
|
||||||
return fileVersionInfo.FileVersion;
|
{
|
||||||
|
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(path);
|
||||||
|
return fileVersionInfo.FileVersion;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user