From 055517567ad6f05b1895e835896057c8ae59a674 Mon Sep 17 00:00:00 2001 From: Daniel Reichelt Date: Sun, 26 Apr 2015 20:19:51 +0200 Subject: [PATCH] Don't truncate files outside the build chroot. The list of files passed to Truncate() might contain absolute symlinks pointing to files outside the chroot, which previously destroyed files on the build host. --- functions/aliases.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/aliases.sh b/functions/aliases.sh index 5d8b1cead..3df028f61 100755 --- a/functions/aliases.sh +++ b/functions/aliases.sh @@ -36,6 +36,9 @@ Truncate () { for FILE in ${@} do - : > ${FILE} + if [ ! -L ${FILE} ] + then + : > ${FILE} + fi done } -- 2.11.4.GIT