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)
This commit is contained in:
Markus Goetz 2015-01-22 14:25:24 +01:00
parent 7a173f6e62
commit dde8e35785
2 changed files with 5 additions and 2 deletions

View file

@ -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(QLinkedList<csync_vio_fil
if (!_currentDiscoveryDirectoryResult) {
return; // possibly aborted
}
qDebug() << Q_FUNC_INFO << "Have" << result.count() << "results.";
qDebug() << Q_FUNC_INFO << "Have" << result.count() << "results for " << _currentDiscoveryDirectoryResult->path;
_directoryContents.insert("/", result);
_directoryContents.insert(_currentDiscoveryDirectoryResult->path, result);
_currentDiscoveryDirectoryResult->list = result;
_currentDiscoveryDirectoryResult->code = 0;

View file

@ -35,6 +35,7 @@ class Account;
*/
struct DiscoveryDirectoryResult {
QString path;
QString msg;
int code;
QLinkedList<csync_vio_file_stat_t*>::iterator iterator;