Introduction
Introduction Statistics Contact Development Disclaimer Help
sfeed_markread: make sure to use proper permissions - sfeed_curses - sfeed curs…
git clone git://git.codemadness.org/sfeed_curses
Log
Files
Refs
README
LICENSE
---
commit d4d23f32309713d4204f72845ee45b6a67256aaf
parent ef0d1174e6339b3ce0a9b5ea16f392369a10b220
Author: Hiltjo Posthuma <[email protected]>
Date: Sat, 24 Jul 2021 22:35:23 +0200
sfeed_markread: make sure to use proper permissions
Don't preserve permissions of tmp files by moving the file, so copy it.
This could also print a warning on DragonFlyBSD when moving a file from /tmp.
For a similar issue see sfeed commit bbe2f3fc9a4b7360ca20d71eaa973e8b1c30b0f6
for the sfeed_update script.
Diffstat:
M sfeed_markread | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/sfeed_markread b/sfeed_markread
@@ -18,8 +18,8 @@ unread)
FILENR == 1 { urls[$0] = 1 }
FILENR == 2 { if (!urls[$0]) { print $0 } }
END { exit(FILENR != 2) }' \
- "/dev/stdin" "$SFEED_URL_FILE" > "$tmp" && \
- mv "$tmp" "$SFEED_URL_FILE"
+ "/dev/stdin" "${urlfile}" > "${tmp}" && \
+ cp "${tmp}" "${urlfile}"
;;
*)
echo "$0 <read|unread>" >&2
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.