diff options
author | Christian Kamm <mail@ckamm.de> | 2019-04-02 10:27:06 +0300 |
---|---|---|
committer | Christian Kamm <mail@ckamm.de> | 2019-04-17 13:38:37 +0300 |
commit | 0677894e17c29167ec401514597ec56bb63b1107 (patch) | |
tree | 28f63ef5d907d7cb810ed81087cd0fc3f1f44beb | |
parent | 076d9fb7f897f658af4894a4517786d8c49144a8 (diff) |
Vfs: local discovery is required on download-request #7124
-rw-r--r-- | src/gui/folder.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 093cf1223..6545b44d4 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -516,19 +516,23 @@ void Folder::downloadVirtualFile(const QString &_relativepath) // Set in the database that we should download the file SyncJournalFileRecord record; _journal.getFileRecord(relativepath, &record); - if (!record.isValid()) + if (!record.isValid()) { + qCWarning(lcFolder) << "No journal record for file " << _relativepath; return; + } if (record._type == ItemTypeVirtualFile) { record._type = ItemTypeVirtualFileDownload; _journal.setFileRecord(record); - // Make sure we go over that file during the discovery - _journal.avoidReadFromDbOnNextSync(relativepath); } else if (record._type == ItemTypeDirectory) { _journal.markVirtualFileForDownloadRecursively(relativepath); } else { qCWarning(lcFolder) << "Invalid existing record " << record._type << " for file " << _relativepath; } + // Make sure we go over that file during the discovery + _localDiscoveryTracker->addTouchedPath(relativepath); + _journal.avoidReadFromDbOnNextSync(relativepath); + // Schedule a sync (Folder man will start the sync in a few ms) slotScheduleThisFolder(); } |