[Pkg-owncloud-commits] [owncloud-client] 25/211: Selective sync: Remove the etag of parent folders in the db when adding or removing items in the selective sync blacklist
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 25 09:10:22 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 621a37be15bf8b6d83d75508e0e07df87898145e
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Thu Oct 9 15:27:41 2014 +0200
Selective sync: Remove the etag of parent folders in the db when adding or removing items in the selective sync blacklist
---
src/mirall/selectivesyncdialog.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/src/mirall/selectivesyncdialog.cpp b/src/mirall/selectivesyncdialog.cpp
index 9e51951..155f6ca 100644
--- a/src/mirall/selectivesyncdialog.cpp
+++ b/src/mirall/selectivesyncdialog.cpp
@@ -276,6 +276,7 @@ void SelectiveSyncDialog::init(Account *account)
void SelectiveSyncDialog::accept()
{
if (_folder) {
+ auto oldBlackListSet = _folder->selectiveSyncBlackList().toSet();
QStringList blackList = _treeView->createBlackList();
_folder->setSelectiveSyncBlackList(blackList);
@@ -283,11 +284,19 @@ void SelectiveSyncDialog::accept()
QSettings settings(_folder->configFile(), QSettings::IniFormat);
settings.beginGroup(FolderMan::escapeAlias(_folder->alias()));
settings.setValue("blackList", blackList);
-
FolderMan *folderMan = FolderMan::instance();
if (_folder->isBusy()) {
_folder->slotTerminateSync();
}
+
+ //The part that changed should not be read from the DB on next sync because there might be new folders
+ // (the ones that are no longer in the blacklist)
+ auto blackListSet = blackList.toSet();
+ auto changes = (oldBlackListSet - blackListSet) + (blackListSet - oldBlackListSet);
+ foreach(const auto &it, changes) {
+ _folder->journalDb()->avoidReadFromDbOnNextSync(it);
+ }
+
folderMan->slotScheduleSync(_folder->alias());
}
QDialog::accept();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list