mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 08:35:16 -04:00
added methods to get files from hash(hash) in directory_storage and ftServer
This commit is contained in:
parent
2d72b88130
commit
0387a28e78
9 changed files with 122 additions and 44 deletions
|
@ -661,18 +661,9 @@ DirectoryStorage::EntryIndex InternalFileHierarchyStorage::getSubDirIndex(Direct
|
|||
return static_cast<DirEntry*>(mNodes[parent_index])->subdirs[dir_tab_index];
|
||||
}
|
||||
|
||||
bool InternalFileHierarchyStorage::searchHash(const RsFileHash& hash,std::list<DirectoryStorage::EntryIndex>& results)
|
||||
bool InternalFileHierarchyStorage::searchHash(const RsFileHash& hash,DirectoryStorage::EntryIndex& result)
|
||||
{
|
||||
DirectoryStorage::EntryIndex indx ;
|
||||
|
||||
if(getIndexFromFileHash(hash,indx))
|
||||
{
|
||||
results.clear();
|
||||
results.push_back(indx) ;
|
||||
return true ;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
return getIndexFromFileHash(hash,result);
|
||||
}
|
||||
|
||||
class DirectoryStorageExprFileEntry: public RsRegularExpression::ExpFileEntry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue