mirror of
https://github.com/jie65535/GrasscutterCommandGenerator.git
synced 2025-06-07 22:59:14 +08:00
Fix data file dir does not exist (#164)
This commit is contained in:
parent
118a7fe0f1
commit
cf3ffeb8c6
@ -26,10 +26,14 @@ namespace GrasscutterTools.Utils
|
||||
/// <summary>
|
||||
/// 应用数据目录
|
||||
/// </summary>
|
||||
public static string GetAppDataFile(string filename) =>
|
||||
Path.Combine(
|
||||
public static string GetAppDataFile(string filename)
|
||||
{
|
||||
var dir = Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
|
||||
"GrasscutterTools",
|
||||
filename);
|
||||
"GrasscutterTools");
|
||||
if (!Directory.Exists(dir))
|
||||
Directory.CreateDirectory(dir);
|
||||
return Path.Combine(dir, filename);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user