Fixup for /etc/dcd.conf support

1) look for /etc/dcd.conf if $HOME is defined but there is no dcd.conf there
2) include missing filename in path
This commit is contained in:
Dicebot 2015-03-26 16:04:14 +02:00
parent e1fbb3e655
commit 39fdc9b332
1 changed files with 2 additions and 2 deletions

View File

@ -250,8 +250,8 @@ string getConfigurationLocation()
configDir = environment.get("HOME", null); configDir = environment.get("HOME", null);
if (configDir !is null) if (configDir !is null)
configDir = buildPath(configDir, ".config", "dcd", CONFIG_FILE_NAME); configDir = buildPath(configDir, ".config", "dcd", CONFIG_FILE_NAME);
else if (!exists(configDir))
configDir = "/etc/"; configDir = buildPath("/etc/", CONFIG_FILE_NAME);
} }
else else
{ {