sfeed

simple feed reader - forked from git.codemadness.org/sfeed
git clone git://src.gearsix.net/sfeed
Log | Files | Refs | Atom | README | LICENSE

commit bbe2f3fc9a4b7360ca20d71eaa973e8b1c30b0f6
parent 6603a965948b1426a254603da8b28b841836a37b
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 23 Feb 2020 19:37:38 +0100

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.

Diffstat:
Msfeed_update | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git 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"