From: Kevin Ottens Date: Tue, 15 Dec 2020 08:50:26 +0000 (+0100) Subject: Ensure a sync happens after a conflict resolution X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~469^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=8c4bd2bb5286bbafbba1c5c45ae0b625257d5f88;p=nextcloud-desktop.git Ensure a sync happens after a conflict resolution You'd expect that after a conflict resolution the file watcher would pick up the change and trigger a sync. For some reason it doesn't seem to happen on at least some Ubuntu systems. In such cases the user would then still have a stale conflict entry in the activity list and wouldn't be able to do anything with it. Signed-off-by: Kevin Ottens --- diff --git a/src/gui/socketapi.cpp b/src/gui/socketapi.cpp index 8aafd0395..67d815788 100644 --- a/src/gui/socketapi.cpp +++ b/src/gui/socketapi.cpp @@ -711,7 +711,9 @@ void SocketApi::command_RESOLVE_CONFLICT(const QString &localFile, SocketListene dialog.setBaseFilename(baseName); dialog.setLocalVersionFilename(conflictedPath); dialog.setRemoteVersionFilename(basePath); - dialog.exec(); + if (dialog.exec() == ConflictDialog::Accepted) { + fileData.folder->scheduleThisFolderSoon(); + } #endif } diff --git a/src/gui/tray/ActivityListModel.cpp b/src/gui/tray/ActivityListModel.cpp index a2d39252d..053d725f4 100644 --- a/src/gui/tray/ActivityListModel.cpp +++ b/src/gui/tray/ActivityListModel.cpp @@ -448,7 +448,9 @@ void ActivityListModel::triggerDefaultAction(int activityIndex) const dialog.setBaseFilename(baseName); dialog.setLocalVersionFilename(conflictedPath); dialog.setRemoteVersionFilename(basePath); - dialog.exec(); + if (dialog.exec() == ConflictDialog::Accepted) { + folder->scheduleThisFolderSoon(); + } return; }