From 929ae965ce3ab01a39369e99d7ff15cc22567b61 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Thu, 15 Apr 2021 13:55:23 +0200 Subject: [PATCH] prevent progress bar to appear after a download is finished with CfApi 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 --- src/libsync/vfs/cfapi/cfapiwrapper.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libsync/vfs/cfapi/cfapiwrapper.cpp b/src/libsync/vfs/cfapi/cfapiwrapper.cpp index 904d6344bfcf7..e44ec5e6d5e70 100644 --- a/src/libsync/vfs/cfapi/cfapiwrapper.cpp +++ b/src/libsync/vfs/cfapi/cfapiwrapper.cpp @@ -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;