From 7ab3a64d56c45124d820f6f7a3d803f573b35128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miskolczi=20Rich=C3=A1rd?= Date: Fri, 31 Mar 2023 11:01:08 +0200 Subject: [PATCH] Not all code paths lead to a profile being created --- Password Manager/ConfigFileManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) 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() {