Skip to content

Commit

Permalink
prevent progress bar to appear after a download is finished with CfApi
Browse files Browse the repository at this point in the history
when using Cloud Filter API with enabled VFS on Windows, a progress bar
stays visible for some time after hydration is completed. Not updating a
last time the progress bar prevents that.

Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
  • Loading branch information
mgallien committed Apr 26, 2021
1 parent 9453bca commit 929ae96
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libsync/vfs/cfapi/cfapiwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ void cfApiSendTransferInfo(const CF_CONNECTION_KEY &connectionKey, const CF_TRAN
qCCritical(lcCfApiWrapper) << "Couldn't send transfer info" << QString::number(transferKey.QuadPart, 16) << ":" << cfExecuteresult << QString::fromWCharArray(_com_error(cfExecuteresult).ErrorMessage());
}

const auto isDownloadFinished = ((offset + currentBlockLength) == totalLength);
if (isDownloadFinished) {
return;
}

// refresh Windows Copy Dialog progress
LARGE_INTEGER progressTotal;
progressTotal.QuadPart = totalLength;
Expand Down

0 comments on commit 929ae96

Please sign in to comment.