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