mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-03 14:32:24 +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") != "") {
|
if (cfg.getValueString("single_directory") != "") {
|
||||||
// Does the directory we want to sync actually exist?
|
// Does the directory we want to sync actually exist?
|
||||||
if (!exists(cfg.getValueString("single_directory"))) {
|
if (!exists(cfg.getValueString("single_directory"))) {
|
||||||
// the requested directory does not exist ..
|
// The requested path to use with --single-directory does not exist locally within the configured 'sync_dir'
|
||||||
log.logAndNotify("ERROR: The requested local directory does not exist. Please check ~/OneDrive/ for requested path");
|
log.logAndNotify("WARNING: The requested path for --single-directory does not exist locally. Creating requested path within ", syncDir);
|
||||||
// Use exit scopes to shutdown API
|
// Make the required path locally
|
||||||
return EXIT_FAILURE;
|
mkdirRecurse(cfg.getValueString("single_directory"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// perform a --synchronize sync
|
// perform a --synchronize sync
|
||||||
|
|
Loading…
Reference in a new issue