diff --git a/PWManager.CLI/Controllers/InitController.cs b/PWManager.CLI/Controllers/InitController.cs index 587e775..0b28214 100644 --- a/PWManager.CLI/Controllers/InitController.cs +++ b/PWManager.CLI/Controllers/InitController.cs @@ -26,6 +26,10 @@ public ExitCondition Handle(string[] args) { } var path = Prompt.Input("Where do you want to create your database file?"); + while(!Path.Exists(path)) { + Console.WriteLine("The given path does not exist."); + path = Prompt.Input("Where do you want to create your database file?"); + } var name = Prompt.Input("What's your desired user name?"); while (name.Length <= 1 || !Regex.IsMatch(name, @"^[a-zA-Z]+$")) {