Skip to content

Commit fc7ec6c

Browse files
HakoyuHakoyu
authored andcommitted
优化代码
1 parent faf59d6 commit fc7ec6c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Libs/GameInfo/GameInfo.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ internal static bool SetGameData(string directoryName)
8383
private static string TryGetgameVersion(string logFile)
8484
{
8585
if (File.Exists(logFile) is false)
86+
{
8687
File.Create(logFile).Close();
88+
return string.Empty;
89+
}
8790
using var sr = new StreamReader(logFile);
8891
if (sr.ReadLine() is string line)
8992
return Regex.Match(line, @"[0-9]+.[0-9]+[^ ]*").Value;

0 commit comments

Comments
 (0)