Skip to content

Commit

Permalink
Correctly handle projects that were not fully downloaded
Browse files Browse the repository at this point in the history
Resolves audacity#6182
  • Loading branch information
crsib committed Apr 17, 2024
1 parent 80db5ac commit 3b38c69
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libraries/lib-cloud-audiocom/CloudSyncService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand All @@ -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
Expand Down

0 comments on commit 3b38c69

Please sign in to comment.