mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-28 03:49:20 +03:00
Emit the sync finished signal a bit delayed.
This allows folder watcher events comnig in before the sync is marked finished. This avoids "endless syncing" as described in bug #1808
This commit is contained in:
parent
5813f63df8
commit
e275ad3866
2 changed files with 17 additions and 0 deletions
|
@ -655,9 +655,24 @@ void Folder::slotSyncFinished()
|
|||
}
|
||||
|
||||
emit syncStateChange();
|
||||
|
||||
// The syncFinished result that is to be triggered here makes the folderman
|
||||
// clearing the current running sync folder marker.
|
||||
// Lets wait a bit to do that because, as long as this marker is not cleared,
|
||||
// file system change notifications are ignored for that folder. And it takes
|
||||
// some time under certain conditions to make the file system notifications
|
||||
// all come in.
|
||||
QTimer::singleShot(200, this, SLOT(slotEmitFinishedDelayed() ));
|
||||
|
||||
}
|
||||
|
||||
void Folder::slotEmitFinishedDelayed()
|
||||
{
|
||||
emit syncFinished( _syncResult );
|
||||
}
|
||||
|
||||
|
||||
|
||||
// the progress comes without a folder and the valid path set. Add that here
|
||||
// and hand the result over to the progress dispatcher.
|
||||
void Folder::slotTransmissionProgress(const Progress::Info &pi)
|
||||
|
|
|
@ -181,6 +181,8 @@ private slots:
|
|||
|
||||
void slotThreadTreeWalkResult(const SyncFileItemVector& );
|
||||
|
||||
void slotEmitFinishedDelayed();
|
||||
|
||||
private:
|
||||
bool init();
|
||||
|
||||
|
|
Loading…
Reference in a new issue