mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
from retroshare/code/branches/v0.5-rpc-b1
-- Merging r6107 through r6332 into 'libretroshare': git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6334 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
7810e7ace3
commit
9e091c16b6
@ -46,7 +46,7 @@
|
||||
static const char FILE_CACHE_SEPARATOR_CHAR = '|' ;
|
||||
|
||||
/****
|
||||
#define FI_DEBUG 1
|
||||
* #define FI_DEBUG 1
|
||||
* #define FI_DEBUG_ALL 1
|
||||
****/
|
||||
|
||||
@ -350,7 +350,14 @@ DirEntry *DirEntry::findDirectory(const std::string& fpath)
|
||||
return it->second;
|
||||
}
|
||||
|
||||
return (it->second)->findDirectory(rempath);
|
||||
|
||||
// Adding more lenient directory look up.
|
||||
// returns lower directory to fpath is a FILE.
|
||||
DirEntry *subdir = (it->second)->findDirectory(rempath);
|
||||
if (subdir)
|
||||
return subdir;
|
||||
else
|
||||
return it->second;
|
||||
}
|
||||
|
||||
|
||||
@ -780,7 +787,7 @@ int FileIndex::loadIndex(const std::string& filename, const std::string& expecte
|
||||
#ifdef FI_DEBUG
|
||||
std::cerr << "FileIndex::loadIndex expected hash does not match" << std::endl;
|
||||
std::cerr << "Expected hash: " << expectedHash << std::endl;
|
||||
std::cerr << "Hash found: " << tmpout.str() << std::endl;
|
||||
std::cerr << "Hash found: " << tmpout << std::endl;
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
@ -90,17 +90,19 @@ int FileIndexStore::loadCache(const CacheData &data)
|
||||
// from the cache. Doing this, the file list still shows in a session where we deleted a friend, but will be removed
|
||||
// at next restart.
|
||||
//
|
||||
peerState ps;
|
||||
mPeerMgr->getFriendNetStatus(data.pid, ps);
|
||||
std::string peername = ps.name + " (" + ps.location + ")";
|
||||
|
||||
if (finew->loadIndex(data.path + '/' + data.name, data.hash, data.size))
|
||||
{
|
||||
#ifdef FIS_DEBUG2
|
||||
std::cerr << "FileIndexStore::loadCache() Succeeded!" << std::endl;
|
||||
#endif
|
||||
/* set the name */
|
||||
finew->root->name = peername; // data.pid; // HACK HERE TODO XXX. name;
|
||||
/* This is not the place to set the peername.
|
||||
* It is a hack, which makes it programmatically impossible
|
||||
* to get the file data out....
|
||||
*
|
||||
* peername should not be used in dbase.
|
||||
*/
|
||||
finew->root->name = data.pid;
|
||||
|
||||
if (local)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user