From 3b38c69aa0d034ee002c32d53fd91cd4fdcd9d1c Mon Sep 17 00:00:00 2001 From: Dmitry Vedenko Date: Thu, 28 Mar 2024 18:16:16 +0300 Subject: [PATCH] Correctly handle projects that were not fully downloaded Resolves #6182 --- libraries/lib-cloud-audiocom/CloudSyncService.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libraries/lib-cloud-audiocom/CloudSyncService.cpp b/libraries/lib-cloud-audiocom/CloudSyncService.cpp index 2aad98210f56..cf09b24be653 100644 --- a/libraries/lib-cloud-audiocom/CloudSyncService.cpp +++ b/libraries/lib-cloud-audiocom/CloudSyncService.cpp @@ -566,7 +566,9 @@ void CloudSyncService::SyncCloudSnapshot( // 1. Local snapshot ID matches the remote snapshot ID. Just complete the // sync right away. If the project was modified locally, but not saved, // the user will be prompted about the autosave. - if (localProjectInfo->SnapshotId == snapshotInfo.Id) + if ( + localProjectInfo->SnapshotId == snapshotInfo.Id && + localProjectInfo->SyncStatus != sync::DBProjectData::SyncStatusDownloading) { CompleteSync( { sync::ProjectSyncResult::StatusCode::Succeeded, {}, utf8Path }); @@ -575,7 +577,7 @@ void CloudSyncService::SyncCloudSnapshot( // 2. Project sync was interrupted. if ( mode == SyncMode::Normal && - localProjectInfo->SyncStatus != sync::DBProjectData::SyncStatusSynced) + localProjectInfo->SyncStatus == sync::DBProjectData::SyncStatusUploading) { // There is not enough information to decide if the project has // diverged. Just open it, so the sync can resume. If the project has