mirror of
https://github.com/abraunegg/onedrive
synced 2024-05-02 06:02:53 +02:00
Display informative message when not using --synchronize
* Prior to all the changes in #314, the client would sync regardless of options. #314 introduced a flag that must be included if you want to sync, however there was no feedback if '--synchronize' was not included and the sync was not occuring. This patch provides that notification & feedback.
This commit is contained in:
parent
034eccfaec
commit
bc15d7f77f
15
src/main.d
15
src/main.d
|
@ -148,6 +148,19 @@ int main(string[] args)
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
// if --synchronize or --monitor not passed in, exit & display help
|
||||
auto performSyncOK = false;
|
||||
if (synchronize || monitor) {
|
||||
performSyncOK = true;
|
||||
}
|
||||
|
||||
if (!performSyncOK) {
|
||||
writeln("\n--synchronize or --monitor missing from your command options or use --help for further assistance\n");
|
||||
writeln("No OneDrive sync will be performed without either of these two arguments being present\n");
|
||||
onedrive.http.shutdown();
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
// initialize system
|
||||
log.vlog("Opening the item database ...");
|
||||
auto itemdb = new ItemDatabase(cfg.databaseFilePath);
|
||||
|
@ -159,7 +172,7 @@ int main(string[] args)
|
|||
chdir(syncDir);
|
||||
|
||||
// Initialise the sync engine
|
||||
log.vlog("Initializing the Synchronization Engine ...");
|
||||
log.log("Initializing the Synchronization Engine ...");
|
||||
auto selectiveSync = new SelectiveSync();
|
||||
selectiveSync.load(cfg.syncListFilePath);
|
||||
selectiveSync.setMask(cfg.getValue("skip_file"));
|
||||
|
|
Loading…
Reference in a new issue