Skip to content

Commit

Permalink
Update PR
Browse files Browse the repository at this point in the history
* Update PR
  • Loading branch information
abraunegg committed Oct 6, 2023
1 parent ea1ca33 commit c69f2ab
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main.d
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,9 @@ int main(string[] cliArgs) {
// Starting a sync
log.log("Starting a sync with Microsoft OneDrive");

// Attempt to reset syncFailures
syncEngineInstance.resetSyncFailures();

// Did the user specify --upload-only?
if (appConfig.getValueBool("upload_only")) {
// Perform the --upload-only sync process
Expand Down
13 changes: 12 additions & 1 deletion src/sync.d
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,17 @@ class SyncEngine {
}
}

// Reset syncFailures to false
void resetSyncFailures() {
// Reset syncFailures to false if these are both empty
if ((fileDownloadFailures.empty) && (fileUploadFailures.empty)) {
log.log("Resetting syncFailures = false");
syncFailures = false;
} else {
log.log("File activity array's not empty - not resetting syncFailures");
}
}

// Perform a sync of the OneDrive Account
// - Query /delta
// - If singleDirectoryScope or nationalCloudDeployment is used we need to generate a /delta like response
Expand All @@ -491,7 +502,7 @@ class SyncEngine {
// - Process any deletes (remove local data)
// - Walk local file system for any differences (new files / data to upload to OneDrive)
void syncOneDriveAccountToLocalDisk() {

// performFullScanTrueUp value
log.vdebug("Perform a Full Scan True-Up: ", appConfig.fullScanTrueUpRequired);
// Fetch the API response of /delta to track changes on OneDrive
Expand Down

0 comments on commit c69f2ab

Please sign in to comment.