From b0915254d181e9e5f403cde06a4029493c6232c6 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Wed, 10 May 2023 11:29:48 +0200 Subject: [PATCH] filelist2content: Do not strip whitespace from filenames Set IFS to the empty string when reading the filenames to avoid leading or trailing whitespace to be stripped from the name. It's not unlikely that other components of bee fail on filenames with trailing spaces, too, but that is not a reason to keep the bug in this tool. --- src/filelist2content.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filelist2content.sh.in b/src/filelist2content.sh.in index 6fe0c78..db8007f 100644 --- a/src/filelist2content.sh.in +++ b/src/filelist2content.sh.in @@ -64,7 +64,7 @@ function do_f2c() { exit 1 fi - while read -r filename ; do + while IFS='' read -r filename ; do data=$(stat --format "$(get_format_string)" "${root}${filename}") if [ "$?" -gt 0 ] ; then