Fix syncdir option is ignored (#302)

* Explicitly set value for syncdir if the option is passed in via CLI rather than 'config' file
This commit is contained in:
abraunegg 2018-12-20 17:27:34 +11:00 committed by GitHub
parent 37131ba697
commit 594bfcec54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -167,6 +167,11 @@ int main(string[] args)
}
// Set the local path OneDrive root
if (syncDirName){
// The user passed in an alternate sync_dir
cfg.setValue("sync_dir", syncDirName);
}
string syncDir;
if ((environment.get("SHELL") == "") && (environment.get("USER") == "")){
// No shell or user set, so expandTilde() will fail - usually headless system running under init.d / systemd