Fixes configuration console output
This commit is contained in:
parent
feedbeb262
commit
9a1b50aef1
2 changed files with 12 additions and 6 deletions
|
|
@ -31,7 +31,8 @@ namespace Server
|
|||
|
||||
private static Configuration ReadConfiguration()
|
||||
{
|
||||
Console.Write($"Reading configuration from {FilePath}...");
|
||||
string relPath = new Uri($"{Core.BaseDirectory}/").MakeRelativeUri(new Uri(FilePath)).ToString();
|
||||
Console.Write($"Reading configuration from {relPath}...");
|
||||
Configuration config;
|
||||
|
||||
if (File.Exists(FilePath))
|
||||
|
|
@ -44,7 +45,7 @@ namespace Server
|
|||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("not found.");
|
||||
Console.WriteLine("not found");
|
||||
config = new Configuration();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -231,10 +231,7 @@ namespace Server
|
|||
return fullPath;
|
||||
}
|
||||
|
||||
public static string FindDataFile(string format, params object[] args)
|
||||
{
|
||||
return FindDataFile(string.Format(format, args));
|
||||
}
|
||||
public static string FindDataFile(string format, params object[] args) => FindDataFile(string.Format(format, args));
|
||||
|
||||
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
|
|
@ -398,6 +395,14 @@ namespace Server
|
|||
Console.ResetColor();
|
||||
Console.WriteLine();
|
||||
|
||||
Configuration config = Configuration.Instance;
|
||||
foreach (string dir in config.DataDirectories.Where(dir => !Directory.Exists(dir)))
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.DarkYellow;
|
||||
Console.WriteLine("Core: Config directory {0} does not exist.", dir);
|
||||
Console.ResetColor();
|
||||
}
|
||||
|
||||
Timer.TimerThread ttObj = new Timer.TimerThread();
|
||||
timerThread = new Thread(ttObj.TimerMain)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue