mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-18 20:34:26 -05:00
bugfix with rehashing already shared files
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1694 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a3e010b842
commit
e929b419f4
@ -197,7 +197,7 @@ bool FileIndexMonitor::loadLocalCache(const CacheData &data) /* called with sto
|
||||
std::string name = data.name ; // this trick allows to load the complete file. Not the one being shared.
|
||||
name[name.length()-1] = 'c' ;
|
||||
|
||||
if ((ok = fi.loadIndex(data.path + '/' + data.name, data.hash, data.size)))
|
||||
if ((ok = fi.loadIndex(data.path + '/' + name, "", data.size)))
|
||||
{
|
||||
#ifdef FIM_DEBUG
|
||||
std::cerr << "FileIndexMonitor::loadCache() Success!";
|
||||
|
@ -731,7 +731,7 @@ int FileIndex::loadIndex(std::string filename, std::string expectedHash, uint64_
|
||||
tmpout << std::setw(2) << std::setfill('0') << std::hex << (unsigned int) (sha_buf[i]);
|
||||
}
|
||||
|
||||
if (expectedHash != tmpout.str())
|
||||
if (expectedHash != "" && expectedHash != tmpout.str())
|
||||
{
|
||||
#ifdef FI_DEBUG
|
||||
std::cerr << "FileIndex::loadIndex expected hash does not match" << std::endl;
|
||||
|
Loading…
Reference in New Issue
Block a user