Skip to content

Commit

Permalink
Fix syncdir option is ignored (#302)
Browse files Browse the repository at this point in the history
* Explicitly set value for syncdir if the option is passed in via CLI rather than 'config' file
  • Loading branch information
abraunegg authored Dec 20, 2018
1 parent 37131ba commit 594bfce
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.d
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 594bfce

Please sign in to comment.