mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-17 21:26:41 +02:00
Fix config folder.
This commit is contained in:
parent
0b1ca6dbfd
commit
c863d2c3c9
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue