]> wimlib.net Git - wimlib/commit
export_image.c: allow duplicate image names in source WIM
authorEric Biggers <ebiggers3@gmail.com>
Tue, 23 Nov 2021 01:55:42 +0000 (17:55 -0800)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 23 Nov 2021 02:11:01 +0000 (18:11 -0800)
commit23ac061e696528b8106d7e69cbc9f9e92e962c42
tree2ce910ec689c5c1a35f2bbacff4099d1aa56d2e0
parent63e46b2f61e1a3f81679db1f8209a2ee6993d20b
export_image.c: allow duplicate image names in source WIM

Reported at https://wimlib.net/forums/viewtopic.php?f=1&t=568.  DISM can
create WIM files containing images with duplicate names, whereas wimlib
enforces unique image names in certain cases such as adding images,
exporting images, and changing image names.  This behavior generally
seems fine, but the "export" check is too strict: an export of "all"
images will fail if the source WIM contains duplicate names.

Fix this by making wimlib_export_image() allow duplicate image names in
the source WIM, provided that they don't collide with image names that
already exist in the destination WIM.
src/export_image.c