Vfs: Clarify SyncEngine::wipeVirtualFiles()
authorChristian Kamm <mail@ckamm.de>
Wed, 23 Jan 2019 11:58:14 +0000 (12:58 +0100)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:38 +0000 (10:58 +0100)
Possibly the behavior should actually change and the function should
de-placeholder all items, not just dehydrated ones.

src/libsync/syncengine.cpp
src/libsync/syncengine.h

index 29ddcf6fd945bf20761ec59356570bf1991e5f7a..c48b75a5638f33bce7d44f58b99c008bac22e5c4 100644 (file)
@@ -1044,7 +1044,8 @@ void SyncEngine::wipeVirtualFiles(const QString &localPath, SyncJournalDb &journ
 
     journal.forceRemoteDiscoveryNextSync();
 
-    // Postcondition: No ItemTypeVirtualFile / ItemTypeVirtualFileDownload left in the db
+    // Postcondition: No ItemTypeVirtualFile / ItemTypeVirtualFileDownload left in the db.
+    // But hydrated placeholders may still be around.
 }
 
 void SyncEngine::abort()
index 9434ab5acedacbb76f95f05eda931556dbaa47ca..add14d48e8c5852dc07dcb8cd4651068414847b8 100644 (file)
@@ -128,6 +128,9 @@ public:
      *
      * Particularly useful when switching off vfs mode or switching to a
      * different kind of vfs.
+     *
+     * Note that *hydrated* placeholder files might still be left. These will
+     * get cleaned up by Vfs::unregisterFolder().
      */
     static void wipeVirtualFiles(const QString &localPath, SyncJournalDb &journal, Vfs &vfs);