fixed getFileInfo and transfer from new database

This commit is contained in:
mr-alice 2016-09-12 20:55:20 +02:00
parent c1e538ff13
commit 274f924ca0
2 changed files with 33 additions and 2 deletions

View file

@ -260,6 +260,7 @@ bool InternalFileHierarchyStorage::updateHash(const DirectoryStorage::EntryIndex
std::cerr << "[directory storage] updating hash at index " << file_index << ", hash=" << hash << std::endl;
RsFileHash& old_hash (static_cast<FileEntry*>(mNodes[file_index])->file_hash) ;
mFileHashes[hash] = file_index ;
old_hash = hash ;
@ -282,6 +283,9 @@ bool InternalFileHierarchyStorage::updateFile(const DirectoryStorage::EntryIndex
fe.file_modtime = modf_time;
fe.file_name = fname;
if(!hash.isNull())
mFileHashes[hash] = file_index ;
return true;
}