mirror of
https://github.com/9ParsonsB/Pulsar.git
synced 2025-07-01 08:23:42 -04:00
more reliable fallback for default directory
This commit is contained in:
@ -213,16 +213,21 @@ namespace Observatory
|
|||||||
{
|
{
|
||||||
//throw new DirectoryNotFoundException($"Directory '{path}' does not exist.");
|
//throw new DirectoryNotFoundException($"Directory '{path}' does not exist.");
|
||||||
//Don't throw, not handling that right now. Just set to current folder.
|
//Don't throw, not handling that right now. Just set to current folder.
|
||||||
logDirectory = new DirectoryInfo(".");
|
logDirectory = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||||
{
|
{
|
||||||
logDirectory = new DirectoryInfo(GetSavedGamesPath() + @"\Frontier Developments\Elite Dangerous");
|
string defaultJournalPath = GetSavedGamesPath() + @"\Frontier Developments\Elite Dangerous";
|
||||||
|
|
||||||
|
logDirectory =
|
||||||
|
Directory.Exists(defaultJournalPath)
|
||||||
|
? new DirectoryInfo(defaultJournalPath)
|
||||||
|
: new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory);
|
||||||
}
|
}
|
||||||
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||||
{
|
{
|
||||||
logDirectory = new DirectoryInfo(".");
|
logDirectory = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user