Move logging of 'initialisation' to actually when the attempt to initialise is performed (#656)

* Move logging of 'initialisation' to actually when the attempt to initialise is performed
This commit is contained in:
abraunegg 2019-09-11 20:26:21 +10:00 committed by GitHub
parent 230be5a23d
commit e32b8b3c7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -517,20 +517,20 @@ int main(string[] args)
selectiveSync.setFileMask(cfg.getValueString("skip_file"));
// Initialize the sync engine
if (cfg.getValueString("get_file_link") == "") {
// Print out that we are initializing the engine only if we are not grabbing the file link
log.logAndNotify("Initializing the Synchronization Engine ...");
}
auto sync = new SyncEngine(cfg, oneDrive, itemDb, selectiveSync);
try {
if (!initSyncEngine(sync)) {
oneDrive.http.shutdown();
return EXIT_FAILURE;
} else {
if (cfg.getValueString("get_file_link") == "") {
// Print out that we are initializing the engine only if we are not grabbing the file link
log.logAndNotify("Initializing the Synchronization Engine ...");
}
}
} catch (CurlException e) {
if (!cfg.getValueBool("monitor")) {
log.log("\nNo internet connection.");
log.log("\nNo Internet connection.");
oneDrive.http.shutdown();
return EXIT_FAILURE;
}