Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accept aborted delete if is ignored due to _hasBlacklistEntry #8958

Merged
merged 1 commit into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelog/unreleased/8837
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Bugfix: Don't crash if a certain move is undone

https://github.com/owncloud/client/issues/8837
https://github.com/owncloud/client/pull/8863
https://github.com/owncloud/client/pull/8958
10 changes: 7 additions & 3 deletions src/libsync/discoveryphase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,17 @@ QPair<bool, QByteArray> DiscoveryPhase::findAndCancelDeletedJob(const QString &o
if (!(instruction == CSYNC_INSTRUCTION_REMOVE
// re-creation of virtual files count as a delete
|| (item->_type == ItemTypeVirtualFile && instruction == CSYNC_INSTRUCTION_NEW)
|| (item->_isRestoration && instruction & (CSYNC_INSTRUCTION_NEW | CSYNC_INSTRUCTION_IGNORE)))) {
|| (item->_isRestoration && instruction == CSYNC_INSTRUCTION_NEW)
// we encountered an ignored error
|| (item->_hasBlacklistEntry && instruction == CSYNC_INSTRUCTION_IGNORE))) {
qCWarning(lcDiscovery) << "OC_ENFORCE(FAILING)" << originalPath;
qCWarning(lcDiscovery) << "instruction == CSYNC_INSTRUCTION_REMOVE" << (instruction == CSYNC_INSTRUCTION_REMOVE);
qCWarning(lcDiscovery) << "(item->_type == ItemTypeVirtualFile && instruction == CSYNC_INSTRUCTION_NEW)"
<< (item->_type == ItemTypeVirtualFile && instruction == CSYNC_INSTRUCTION_NEW);
qCWarning(lcDiscovery) << "(item->_isRestoration && instruction & (CSYNC_INSTRUCTION_NEW | CSYNC_INSTRUCTION_IGNORE)"
<< (item->_isRestoration && instruction & (CSYNC_INSTRUCTION_NEW | CSYNC_INSTRUCTION_IGNORE));
qCWarning(lcDiscovery) << "(item->_isRestoration && instruction == CSYNC_INSTRUCTION_NEW)"
<< (item->_isRestoration && instruction == CSYNC_INSTRUCTION_NEW);
qCWarning(lcDiscovery) << "(item->_hasBlacklistEntry && instruction == CSYNC_INSTRUCTION_IGNORE)"
<< (item->_hasBlacklistEntry && instruction == CSYNC_INSTRUCTION_IGNORE);
qCWarning(lcDiscovery) << "instruction" << instruction;
qCWarning(lcDiscovery) << "item->_type" << item->_type;
qCWarning(lcDiscovery) << "item->_isRestoration " << item->_isRestoration;
Expand Down