From d9c64b267540a7c0a62f219c1c27c790234fd11c Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 19 May 2025 19:24:43 +0100 Subject: xbmk: stricter handling of files on while loops i overlooked these! Signed-off-by: Leah Rowe --- include/tree.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/tree.sh') diff --git a/include/tree.sh b/include/tree.sh index 25d4732c..9dccf857 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -332,8 +332,9 @@ check_makefile() copy_elf() { - [ -f "$listfile" ] && x_ mkdir -p "$dest_dir" && while read -r f; do + [ -f "$listfile" ] && x_ mkdir -p "$dest_dir" + [ ! -f "$listfile" ] || while read -r f; do [ -f "$srcdir/$f" ] && x_ cp "$srcdir/$f" "$dest_dir" - done < "$listfile" + done < "$listfile" || err "copy_elf $*: cannot read '$listfile'" x_ make clean -C "$srcdir" $cleanargs } -- cgit v1.2.1