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
This commit is contained in:
csoler 2011-11-23 16:05:57 +00:00
parent 107f64c23f
commit 379927a846

View file

@ -161,7 +161,7 @@ int FileIndexStore::loadCache(const CacheData &data)
/* Search Interface - For Directory Access */ /* 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 */ /* lock it up */
lockData(); lockData();
@ -169,17 +169,18 @@ int FileIndexStore::RequestDirDetails(std::string uid, std::string /*path*/, Dir
std::map<RsPeerId, FileIndex *>::const_iterator it; std::map<RsPeerId, FileIndex *>::const_iterator it;
it = indices.find(uid); it = indices.find(uid);
bool found = true; bool found = true;
if (it == indices.end())
if (it != indices.end())
{ {
//DirEntry *fdir = (it->second).lookupDirectory(path); //DirEntry *fdir = (it->second).lookupDirectory(path);
/* translate it /* translate it
*/ */
found = false; bool b = FileIndex::extractData((it->second)->root,details) ;
found = found && b ;
} }
else else
{
found = false; found = false;
}
unlockData(); unlockData();
return found; return found;