From ea129fb206eea9acfbd7bf43d4ff6135218af36a Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Sun, 24 Feb 2019 05:11:36 -0500 Subject: [PATCH] Allow cpio mv to override existing entries --- native/jni/utils/cpio.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/native/jni/utils/cpio.cpp b/native/jni/utils/cpio.cpp index 6eecdf7fa..f7ae9b927 100644 --- a/native/jni/utils/cpio.cpp +++ b/native/jni/utils/cpio.cpp @@ -201,6 +201,7 @@ void cpio_rw::mv(entry_map::iterator &it, const char *to) { auto &name = static_cast(ex.mapped().get())->filename; name = to; ex.key() = name; + entries.erase(name); entries.insert(std::move(ex)); }