Ensure a file can be replaced by a directory
commite378170c2555b656ef87715d8284d038037ced5f
authorDan McGee <dan@archlinux.org>
Mon, 27 Jun 2011 14:07:06 +0000 (27 09:07 -0500)
committerDan McGee <dan@archlinux.org>
Mon, 27 Jun 2011 14:15:31 +0000 (27 09:15 -0500)
treeec6987dcd3f351903881bedee0a3bd846aa7fbe4
parentf8f4c2a6f301ab423f3ca702ebc24854cc701683
Ensure a file can be replaced by a directory

This addresses FS#24904. In a normal upgrade case, this replacement
seems to work just fine. However, when doing a sync "replace" type
upgrade, we weren't properly handling this edge case due to path
comparison not ignoring trailing slashes. Fix this by pruning any
trailing slashes past a certain point of file conflict resolution where
we no longer need them, which allows us to safely detect cases such as
now tested in the new pactest.

Signed-off-by: Dan McGee <dan@archlinux.org>
lib/libalpm/conflict.c
test/pacman/tests/fileconflict008.py [new file with mode: 0644]