Allow cpio mv to override existing entries

This commit is contained in:
topjohnwu 2019-02-24 05:11:36 -05:00
parent 3356d7b6ff
commit ea129fb206

View File

@ -201,6 +201,7 @@ void cpio_rw::mv(entry_map::iterator &it, const char *to) {
auto &name = static_cast<cpio_entry*>(ex.mapped().get())->filename;
name = to;
ex.key() = name;
entries.erase(name);
entries.insert(std::move(ex));
}