From: Mikko Rasa Date: Sat, 29 Oct 2016 16:45:40 +0000 (+0300) Subject: Replace files from earlier packs with those from the newly added one X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=116ea4040cbfa5b6985e95577fd7e029cc2bf30b;p=libs%2Fdatafile.git Replace files from earlier packs with those from the newly added one --- diff --git a/source/packsource.cpp b/source/packsource.cpp index 1accdb0..f4c06b5 100644 --- a/source/packsource.cpp +++ b/source/packsource.cpp @@ -60,9 +60,11 @@ void PackSource::add_pack(IO::Seekable *io, const string &fn, const string &filt FileMap pack_files; pack->collect_files(pack_files, filter); - files.insert(pack_files.begin(), pack_files.end()); for(FileMap::const_iterator i=pack_files.begin(); i!=pack_files.end(); ++i) + { + files[i->first] = i->second; i->second->collect_objects(objects); + } } list PackSource::list_files() const