From bfcf5d67d76efc0892e04f55c2ed1f3e011d3b73 Mon Sep 17 00:00:00 2001 From: dougb Date: Sat, 3 May 2003 06:35:19 +0000 Subject: [PATCH] Preserve directory structure in PRESERVED_FILES_DIR to avoid filename collisions. Submitted by: des --- usr.sbin/mergemaster/mergemaster.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/mergemaster/mergemaster.sh b/usr.sbin/mergemaster/mergemaster.sh index b444023068ac..66d8cf329642 100755 --- a/usr.sbin/mergemaster/mergemaster.sh +++ b/usr.sbin/mergemaster/mergemaster.sh @@ -656,8 +656,8 @@ do_install_and_rm () { case "${PRESERVE_FILES}" in [Yy][Ee][Ss]) if [ -f "${3}/${2##*/}" ]; then - mkdir -p ${PRESERVE_FILES_DIR} - cp ${3}/${2##*/} ${PRESERVE_FILES_DIR} + mkdir -p ${PRESERVE_FILES_DIR}/${2%/*} + cp ${3}/${2##*/} ${PRESERVE_FILES_DIR}/${2%/*} fi ;; esac