From: Olivier Goffart Date: Tue, 16 Oct 2018 14:18:39 +0000 (+0200) Subject: Discovery: make sure finished is not called twice, even in case of errors X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~481 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=5a1c93d0ace49ad8fa092f1105ace805621e7396;p=nextcloud-desktop.git Discovery: make sure finished is not called twice, even in case of errors --- diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index 0a50488ef..4bd7dce69 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -1182,6 +1182,7 @@ int ProcessDirectoryJob::processSubJobs(int nbJobs) void ProcessDirectoryJob::dbError() { _discoveryData->fatalError(tr("Error while reading the database")); + _pendingAsyncJobs = -1; // We're finished, we don't want to emit finished again emit finished(); } }