Fix SettingsFileIsValid

This commit is contained in:
Mbucari 2023-03-22 11:46:11 -06:00
parent 1783da3e2d
commit ed6f741a65

View File

@ -19,8 +19,13 @@ namespace LibationFileManager
var pDic = new PersistentDictionary(settingsFile, isReadOnly: false); var pDic = new PersistentDictionary(settingsFile, isReadOnly: false);
var booksDir = pDic.GetString(nameof(Books)); var booksDir = pDic.GetString(nameof(Books));
if (booksDir is null || !Directory.Exists(booksDir))
if (booksDir is null) return false;
if (!Directory.Exists(booksDir))
{ {
//"Books" is not null, so setup has already been run.
//Since Books can't be found, try to create it in Libation settings folder
booksDir = Path.Combine(Path.GetDirectoryName(settingsFile), nameof(Books)); booksDir = Path.Combine(Path.GetDirectoryName(settingsFile), nameof(Books));
try try
{ {