Skip to content

Commit

Permalink
Update sync.d
Browse files Browse the repository at this point in the history
* Fix that the '.' were not being printed in --verbose mode for fetching the /delta response
  • Loading branch information
abraunegg committed Oct 18, 2023
1 parent 3a3c954 commit d653ff3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/sync.d
Original file line number Diff line number Diff line change
Expand Up @@ -704,15 +704,15 @@ class SyncEngine {
currentDeltaLink = null;
}

// Dynamic output for a non-verbose run so that the user knows something is happening
if (log.verbose == 0) {
// Dynamic output for non-verbose and verbose run so that the user knows something is being retreived from the OneDrive API
if (log.verbose <= 1) {
if (!appConfig.surpressLoggingOutput) {
log.fileOnly("Fetching items from the OneDrive API for Drive ID: ", driveIdToQuery);
// Use the dots to show the application is 'doing something'
write("Fetching items from the OneDrive API for Drive ID: ", driveIdToQuery, " .");
}
} else {
log.vlog("Fetching /delta response from the OneDrive API for Drive ID: ", driveIdToQuery);
log.vdebug("Fetching /delta response from the OneDrive API for Drive ID: ", driveIdToQuery);
}

// Create a new API Instance for querying /delta and initialise it
Expand All @@ -738,7 +738,7 @@ class SyncEngine {
ulong nrChanges = count(deltaChanges["value"].array);
int changeCount = 0;

if (log.verbose == 0) {
if (log.verbose <= 1) {
// Dynamic output for a non-verbose run so that the user knows something is happening
if (!appConfig.surpressLoggingOutput) {
write(".");
Expand Down Expand Up @@ -791,7 +791,7 @@ class SyncEngine {
object.destroy(getDeltaQueryOneDriveApiInstance);

// Log that we have finished querying the /delta API
if (log.verbose == 0) {
if (log.verbose <= 1) {
if (!appConfig.surpressLoggingOutput) {
write("\n");
}
Expand Down

0 comments on commit d653ff3

Please sign in to comment.