Fix config folder.

This commit is contained in:
Matthias C. M. Troffaes 2018-05-16 09:11:50 +01:00
parent 0b1ca6dbfd
commit c863d2c3c9

View file

@ -8,15 +8,15 @@ int main(string[] args)
{ {
// Determine the user home directory. // Determine the user home directory.
// Need to avoid using ~ here as expandTilde() below does not interpret correctly when running under init.d scripts // Need to avoid using ~ here as expandTilde() below does not interpret correctly when running under init.d scripts
string homePath = environment.get("XDG_CONFIG_HOME"); string configPath = environment.get("XDG_CONFIG_HOME");
if (homePath == ""){ if (configPath == ""){
// XDG_CONFIG_HOME does not exist on systems where X11 is not present - ie - headless systems / servers // XDG_CONFIG_HOME does not exist on systems where X11 is not present - ie - headless systems / servers
// Get HOME environment variable // Get HOME environment variable
homePath = environment.get("HOME"); configPath = environment.get("HOME") ~ "/.config";
} }
// configuration directory // configuration directory
string configDirName = homePath ~ "/.config/onedrive"; string configDirName = configPath ~ "/onedrive";
// only download remote changes // only download remote changes
bool downloadOnly; bool downloadOnly;
// override the sync directory // override the sync directory