2
0

weird env

This commit is contained in:
glax 2023-07-31 00:58:22 +02:00
parent 70b1ae4812
commit c91754614b

View File

@ -30,11 +30,14 @@ public static class Tranga
"-------------------------------------------\n"+
" Starting Tranga-API\n"+
"-------------------------------------------");
logger.WriteLine("Tranga", "Loading settings.");
TrangaSettings settings = File.Exists(settingsFilePath)
? TrangaSettings.LoadSettings(settingsFilePath)
: new TrangaSettings(downloadFolderPath, applicationFolderPath);
TrangaSettings settings;
if (File.Exists(settingsFilePath))
{
logger.WriteLine("Tranga", $"Loading settings {settingsFilePath}");
settings = TrangaSettings.LoadSettings(settingsFilePath);
}else
settings = new TrangaSettings(downloadFolderPath, applicationFolderPath);
Directory.CreateDirectory(settings.workingDirectory);
Directory.CreateDirectory(settings.downloadLocation);