Ensure profile images show on newly created wallets

This commit is contained in:
TheXamlGuy
2024-06-29 22:06:08 +01:00
parent 4de00a5b4f
commit f4808ccb50
2 changed files with 12 additions and 2 deletions
+7 -1
View File
@@ -10,7 +10,13 @@ public class WalletCollectionInitializer(IHostEnvironment environment,
{
public void Initialize()
{
foreach (string wallet in Directory.EnumerateDirectories(Path.Combine(environment.ContentRootPath, "Wallet")))
string path = Path.Combine(environment.ContentRootPath, "Wallet");
if (!Directory.Exists(path))
{
return;
}
foreach (string wallet in Directory.EnumerateDirectories(path))
{
string name = Path.GetFileName(wallet);
string section = $"Wallet:{name}";