Ensure a sync happens after a conflict resolution
authorKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 08:50:26 +0000 (09:50 +0100)
committerCamila (Rebase PR Action) <hello@camila.codes>
Tue, 15 Dec 2020 09:40:57 +0000 (09:40 +0000)
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 <kevin.ottens@nextcloud.com>
src/gui/socketapi.cpp
src/gui/tray/ActivityListModel.cpp

index 8aafd0395f1ce91ebe84de5b5bbcd30e35557d04..67d81578824584597dedeea0642d5719ba7e4469 100644 (file)
@@ -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
 }
 
index a2d39252de464454a91da3f96a19bd328c280b23..053d725f4526756ef62011ef3e09b13eb89a58d7 100644 (file)
@@ -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;
     }