Skip to content

Commit 3c068b5

Browse files
ckammogoffart
authored andcommittedOct 17, 2018
Virtual files: Wipe selective sync settings when enabled
1 parent c8b398d commit 3c068b5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
 

‎src/gui/accountsettings.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,16 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
335335
OwncloudWizard::askExperimentalVirtualFilesFeature([folder, this](bool enable) {
336336
if (enable && folder)
337337
folder->setUseVirtualFiles(enable);
338+
339+
// Also wipe selective sync settings
340+
bool ok = false;
341+
auto oldBlacklist = folder->journalDb()->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok);
342+
folder->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, {});
343+
for (const auto &entry : oldBlacklist) {
344+
folder->journalDb()->avoidReadFromDbOnNextSync(entry);
345+
}
346+
FolderMan::instance()->scheduleFolder(folder);
347+
338348
// Make sure the size is recomputed as the virtual file indicator changes
339349
ui->_folderList->doItemsLayout();
340350
});

0 commit comments

Comments
 (0)
Please sign in to comment.