From 379927a846ab098c44a8efc5158cdc8b844bbe55 Mon Sep 17 00:00:00 2001 From: csoler Date: Wed, 23 Nov 2011 16:05:57 +0000 Subject: [PATCH] corrected disabled RequestdirDetails in FileIndexStore to be able to retrieve root directory of a user ID git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4683 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/dbase/fistore.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libretroshare/src/dbase/fistore.cc b/libretroshare/src/dbase/fistore.cc index 4a80e1f0e..6cf3c2a71 100644 --- a/libretroshare/src/dbase/fistore.cc +++ b/libretroshare/src/dbase/fistore.cc @@ -161,7 +161,7 @@ int FileIndexStore::loadCache(const CacheData &data) /* Search Interface - For Directory Access */ -int FileIndexStore::RequestDirDetails(std::string uid, std::string /*path*/, DirDetails &/*details*/) const +int FileIndexStore::RequestDirDetails(std::string uid, std::string /*path*/, DirDetails& details) const { /* lock it up */ lockData(); @@ -169,17 +169,18 @@ int FileIndexStore::RequestDirDetails(std::string uid, std::string /*path*/, Dir std::map::const_iterator it; it = indices.find(uid); bool found = true; - if (it == indices.end()) + + if (it != indices.end()) { //DirEntry *fdir = (it->second).lookupDirectory(path); /* translate it */ - found = false; + bool b = FileIndex::extractData((it->second)->root,details) ; + + found = found && b ; } else - { found = false; - } unlockData(); return found;