diff --git a/src/main.d b/src/main.d index ed9896e8..e9bacdd0 100644 --- a/src/main.d +++ b/src/main.d @@ -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; }