From: Paul Hänsch Date: Wed, 18 Jul 2018 16:15:36 +0000 (+0200) Subject: bugfix: prevent accidental truncation of bookmark file on update X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=d3c3721309a5e6080162c00787f86299fa8d453f;p=serve0 bugfix: prevent accidental truncation of bookmark file on update --- diff --git a/index.cgi b/index.cgi index 4dbd115..8359b63 100755 --- a/index.cgi +++ b/index.cgi @@ -26,7 +26,7 @@ case $(GET a) in s="$(POST search |STRING)"; f="$(POST filter |STRING)" if LOCK "$bm"; then - grep -m1 -avF " search=$s filter=$f${CR}" "$bm" >"$bm.tmp" + grep -avF " search=$s filter=$f${CR}" "$bm" >"$bm.tmp" [ ! "$(POST delete)" ] \ && printf '%s search=%s filter=%s\r\n' \ "$(POST name |STRING)" "$s" "$f" >>"$bm.tmp"