Skip to content

Commit

Permalink
Discovery: Attempt to fix crash in DiscoveryPhase::findAndCancelDelet…
Browse files Browse the repository at this point in the history
…edJob

Issue #7722

I was not able to reproduce the crash, but this is seen in the crash
reporter.

The crash occurs because the ENFORCE in that function is reached. One way
this could happen is because findAndCancelDeletedJob would be called
for the same path multiple times. Potentially this could perhaps be caused
by duplicated inodes are duplicated. But this is hard to test.
  • Loading branch information
ogoffart committed Feb 6, 2020
1 parent fcf56e0 commit 090b5da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions changelog/unreleased/7722
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Bugfix: Fixed a potential crash while discovering moves


https://github.com/owncloud/client/issues/7722
1 change: 1 addition & 0 deletions src/libsync/discoveryphase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ QPair<bool, QByteArray> DiscoveryPhase::findAndCancelDeletedJob(const QString &o
(*it)->_instruction = CSYNC_INSTRUCTION_NONE;
result = true;
oldEtag = (*it)->_etag;
_deletedItem.erase(it);
}
if (auto *otherJob = _queuedDeletedDirectories.take(originalPath)) {
oldEtag = otherJob->_dirItem->_etag;
Expand Down

0 comments on commit 090b5da

Please sign in to comment.