diff --git a/Password Manager/ConfigFileManager.cs b/Password Manager/ConfigFileManager.cs index c19394b..68df59f 100644 --- a/Password Manager/ConfigFileManager.cs +++ b/Password Manager/ConfigFileManager.cs @@ -20,6 +20,10 @@ namespace Password_Manager public static void Init() { + bool success = false; + + while (!success) + { if (File.Exists(CONFIGPATH)) { StreamReader sr = new StreamReader(CONFIGPATH); @@ -47,6 +51,7 @@ namespace Password_Manager if (path != null && recipient != null) { Configuration = new Config(path, recipient); + success = true; } else { @@ -58,6 +63,7 @@ namespace Password_Manager CreateDefaultConfig(); } } + } public static string GetPath() {