If saving a remote capture on shutdown, wait for transfer before exit

This commit is contained in:
baldurk committed 2026-10-23 23:13:16 +01:00
1 parent f1c7eff75b
commit 7bacf7f79b
1 file changed
+7
@@ -912,6 +912,13 @@ bool LiveCapture::checkAllowClose(int totalUnsavedCaptures, bool &noToAll)
{
bool success = saveCapture(cap, QString());
// need to wait for the transfer to finish before exiting, when captureCopied() is called
// cap->local will become true. Otherwise wait until the transfer is finished or we disconnect
// for another reason - and offer a cancel button
ShowProgressDialog(
this, tr("Transferring file."), [this, cap]() { return !IsConnected() || cap->local; },
NULL, [&success]() { success = false; });
if(!success)
{
m_IgnoreThreadClosed = false;