Skip to content

Commit e90544d

Browse files
author
Evgeniy Ivchenko
committed
Create local app data directory if it doesn't exist
1 parent 80a0175 commit e90544d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/NitroSharp/Saving/GameSaveManager.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ internal class GameSaveManager
2222

2323
public GameSaveManager(Configuration configuration)
2424
{
25+
string localAppData = Environment.GetFolderPath(
26+
Environment.SpecialFolder.LocalApplicationData,
27+
Environment.SpecialFolderOption.Create
28+
);
2529
SaveDirectory = Path.Combine(
26-
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
30+
localAppData,
2731
Path.Combine("Committee of Zero", configuration.ProductName)
2832
);
2933
SaveDirectory = Path.Combine(SaveDirectory, configuration.ProfileName);

0 commit comments

Comments
 (0)