From dde8e357857ba28a9d01438659a7465f310169f0 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 22 Jan 2015 14:25:24 +0100 Subject: [PATCH] Discovery: Put results into proper place in map The map is for memory management. It can later be used as a cache for the recursive PROPFIND (if we decide to activate it again) --- src/libsync/discoveryphase.cpp | 6 ++++-- src/libsync/discoveryphase.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index 2414c53d0..28898261b 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -319,6 +319,7 @@ void DiscoveryMainThread::doOpendirSlot(QString subPath, DiscoveryDirectoryResul // Result gets written in there _currentDiscoveryDirectoryResult = r; + _currentDiscoveryDirectoryResult->path = fullPath; // Schedule the DiscoverySingleDirectoryJob _singleDirJob = new DiscoverySingleDirectoryJob(_account, fullPath, this); @@ -335,9 +336,10 @@ void DiscoveryMainThread::singleDirectoryJobResultSlot(QLinkedListpath; - _directoryContents.insert("/", result); + + _directoryContents.insert(_currentDiscoveryDirectoryResult->path, result); _currentDiscoveryDirectoryResult->list = result; _currentDiscoveryDirectoryResult->code = 0; diff --git a/src/libsync/discoveryphase.h b/src/libsync/discoveryphase.h index aa618d4b3..47f721b0f 100644 --- a/src/libsync/discoveryphase.h +++ b/src/libsync/discoveryphase.h @@ -35,6 +35,7 @@ class Account; */ struct DiscoveryDirectoryResult { + QString path; QString msg; int code; QLinkedList::iterator iterator;