From 23cbe7be4a439c80fc23798fc69453abec0018e3 Mon Sep 17 00:00:00 2001 From: Andrey Petelin Date: Wed, 29 Oct 2025 22:11:29 +0500 Subject: [PATCH] fix: include filename in log and remove temp file on CRLF-to-LF conversion --- podkop/files/usr/lib/helpers.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/podkop/files/usr/lib/helpers.sh b/podkop/files/usr/lib/helpers.sh index 8957711..4c005f6 100644 --- a/podkop/files/usr/lib/helpers.sh +++ b/podkop/files/usr/lib/helpers.sh @@ -293,10 +293,10 @@ convert_crlf_to_lf() { local filepath="$1" if grep -q $'\r' "$filepath"; then - log "Downloaded file has Windows line endings (CRLF). Converting to Unix (LF)" "debug" + log "File '$filepath' contains CRLF line endings. Converting to LF..." "debug" local tmpfile tmpfile=$(mktemp) - tr -d '\r' < "$filepath" > "$tmpfile" && mv "$tmpfile" "$filepath" + tr -d '\r' < "$filepath" > "$tmpfile" && mv "$tmpfile" "$filepath" || rm -f "$tmpfile" fi }