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.
This commit is contained in:
parent
1af19fd662
commit
055517567a
|
@ -36,6 +36,9 @@ Truncate ()
|
|||
{
|
||||
for FILE in ${@}
|
||||
do
|
||||
: > ${FILE}
|
||||
if [ ! -L ${FILE} ]
|
||||
then
|
||||
: > ${FILE}
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue