From 116ea4040cbfa5b6985e95577fd7e029cc2bf30b Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 29 Oct 2016 19:45:40 +0300 Subject: [PATCH] Replace files from earlier packs with those from the newly added one --- source/packsource.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.43.0