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
|
@ -15,10 +15,18 @@ namespace RevokeMsgPatcher.Utils
|
|||
/// <param name="path"></param>
|
||||
/// <returns></returns>
|
||||
public static string GetFileVersion(string path)
|
||||
{
|
||||
if (File.Exists(path))
|
||||
{
|
||||
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(path);
|
||||
return fileVersionInfo.FileVersion;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 计算文件SHA1
|
||||
|
|
Loading…
Reference in New Issue
Block a user