Ensure existing dirs
MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -63,6 +63,10 @@ namespace WalletWasabi.Gui
TorLogsFile = Path.Combine(DataDir, "TorLogs.txt");
WalletsDir = Path.Combine(DataDir, "Wallets");
WalletBackupsDir = Path.Combine(DataDir, "WalletBackups");
+
+ Directory.CreateDirectory(DataDir);
+ Directory.CreateDirectory(WalletsDir);
+ Directory.CreateDirectory(WalletBackupsDir);
}
public static void InitializeUiConfig(UiConfig uiConfig)

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
@@ -226,11 +226,6 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
Password = "";
SetValidationMessage("");
- if (!File.Exists(Global.WalletsDir))
- {
- Directory.CreateDirectory(Global.WalletsDir);
- }
-
var directoryInfo = new DirectoryInfo(Global.WalletsDir);
var walletFiles = directoryInfo.GetFiles("*.json", SearchOption.TopDirectoryOnly).OrderByDescending(t => t.LastAccessTimeUtc);
foreach (var file in walletFiles)

MODIFY
WalletWasabi/Helpers/EnvironmentHelpers.cs
WalletWasabi/Helpers/EnvironmentHelpers.cs
@@ -34,7 +34,7 @@ namespace WalletWasabi.Helpers
public static string GetDataDir(string appName)
{
- string directory = null;
+ string directory;
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{

Ensure existing dirs