mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-21 23:26:37 +02:00
Update --single-directory path handling when path does not exist locally (#1031)
* If the requested path for --single-directory does not exist locally, create it rather than display error and exit
This commit is contained in:
parent
2099ec2994
commit
431678753d
|
@ -846,10 +846,10 @@ int main(string[] args)
|
|||
if (cfg.getValueString("single_directory") != "") {
|
||||
// Does the directory we want to sync actually exist?
|
||||
if (!exists(cfg.getValueString("single_directory"))) {
|
||||
// the requested directory does not exist ..
|
||||
log.logAndNotify("ERROR: The requested local directory does not exist. Please check ~/OneDrive/ for requested path");
|
||||
// Use exit scopes to shutdown API
|
||||
return EXIT_FAILURE;
|
||||
// The requested path to use with --single-directory does not exist locally within the configured 'sync_dir'
|
||||
log.logAndNotify("WARNING: The requested path for --single-directory does not exist locally. Creating requested path within ", syncDir);
|
||||
// Make the required path locally
|
||||
mkdirRecurse(cfg.getValueString("single_directory"));
|
||||
}
|
||||
}
|
||||
// perform a --synchronize sync
|
||||
|
|
Loading…
Reference in a new issue