From bbe2f3fc9a4b7360ca20d71eaa973e8b1c30b0f6 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 23 Feb 2020 19:37:38 +0100 Subject: sfeed_update: don't preserve permissions of tmp files by moving, so copy noticed on DragonFlyBSD where it prints a warning when moving the file from /tmp. To reproduce it: touch /tmp/file mv /tmp/file ~/ On other systems this would not print a warning, but it would preserve the group permissions etc. --- sfeed_update | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sfeed_update b/sfeed_update index 3b1476f..398c408 100755 --- a/sfeed_update +++ b/sfeed_update @@ -143,11 +143,12 @@ feed() { fi rm -f "${tmpfeedfile}.merge" - # atomic move. - if ! mv "${tmpfeedfile}.order" "${sfeedfile}"; then - log "${name}" "FAIL (MOVE)" + # copy + if ! cp "${tmpfeedfile}.order" "${sfeedfile}"; then + log "${name}" "FAIL (COPY)" return fi + rm -f "${tmpfeedfile}.order" # OK log "${name}" "OK" -- cgit v1.2.3