Replace files from earlier packs with those from the newly added one
authorMikko Rasa <tdb@tdb.fi>
Sat, 29 Oct 2016 16:45:40 +0000 (19:45 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 29 Oct 2016 16:45:40 +0000 (19:45 +0300)
source/packsource.cpp

index 1accdb0..f4c06b5 100644 (file)
@@ -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::FileInfo> PackSource::list_files() const