mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-02 06:02:53 +02:00
Merge pull request #1 from mcmtroffaes/config-folder-fix
Fix config folder.
This commit is contained in:
commit
bf7986df14
|
@ -8,15 +8,15 @@ int main(string[] args)
|
|||
{
|
||||
// Determine the user home directory.
|
||||
// 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");
|
||||
if (homePath == ""){
|
||||
string configPath = environment.get("XDG_CONFIG_HOME");
|
||||
if (configPath == ""){
|
||||
// XDG_CONFIG_HOME does not exist on systems where X11 is not present - ie - headless systems / servers
|
||||
// Get HOME environment variable
|
||||
homePath = environment.get("HOME");
|
||||
configPath = environment.get("HOME") ~ "/.config";
|
||||
}
|
||||
|
||||
// configuration directory
|
||||
string configDirName = homePath ~ "/.config/onedrive";
|
||||
string configDirName = configPath ~ "/onedrive";
|
||||
// only download remote changes
|
||||
bool downloadOnly;
|
||||
// override the sync directory
|
||||
|
|
Loading…
Reference in a new issue