From a8d4d9fd13c0f9f071ccfa3e4026ad54b80624f3 Mon Sep 17 00:00:00 2001 From: upstream svn Date: Sat, 9 Apr 2011 20:12:27 +0000 Subject: [PATCH] Fix evil bug when renaming shared files --- .svn-revision | 2 +- src/KnownFile.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.svn-revision b/.svn-revision index c52b1265..d8e804da 100644 --- a/.svn-revision +++ b/.svn-revision @@ -1 +1 @@ -10524 +10525 diff --git a/src/KnownFile.cpp b/src/KnownFile.cpp index 44f8834b..fd5e1569 100644 --- a/src/KnownFile.cpp +++ b/src/KnownFile.cpp @@ -500,6 +500,7 @@ bool CKnownFile::LoadHashsetFromFile(const CFileDataIO* file, bool checkhash) CMD4Hash checkid = file->ReadHash(); uint16 parts = file->ReadUInt16(); + m_hashlist.clear(); for (uint16 i = 0; i < parts; ++i){ CMD4Hash cur_hash = file->ReadHash(); m_hashlist.push_back(cur_hash); @@ -542,6 +543,7 @@ bool CKnownFile::LoadHashsetFromFile(const CFileDataIO* file, bool checkhash) bool CKnownFile::LoadTagsFromFile(const CFileDataIO* file) { uint32 tagcount = file->ReadUInt32(); + m_taglist.clear(); for (uint32 j = 0; j != tagcount; ++j) { CTag newtag(*file, true); switch(newtag.GetNameID()){ -- 2.11.4.GIT