Not all code paths lead to a profile being created

This commit is contained in:
2023-03-31 11:01:08 +02:00
parent 83a2ceb42d
commit 7ab3a64d56

View File

@@ -19,6 +19,10 @@ namespace Password_Manager
private static Config Configuration; private static Config Configuration;
public static void Init() public static void Init()
{
bool success = false;
while (!success)
{ {
if (File.Exists(CONFIGPATH)) if (File.Exists(CONFIGPATH))
{ {
@@ -47,6 +51,7 @@ namespace Password_Manager
if (path != null && recipient != null) if (path != null && recipient != null)
{ {
Configuration = new Config(path, recipient); Configuration = new Config(path, recipient);
success = true;
} }
else else
{ {
@@ -58,6 +63,7 @@ namespace Password_Manager
CreateDefaultConfig(); CreateDefaultConfig();
} }
} }
}
public static string GetPath() public static string GetPath()
{ {