]> git.plutz.net Git - serve0/commitdiff
bugfix: prevent accidental truncation of bookmark file on update
authorPaul Hänsch <paul@plutz.net>
Wed, 18 Jul 2018 16:15:36 +0000 (18:15 +0200)
committerPaul Hänsch <paul@plutz.net>
Wed, 18 Jul 2018 16:15:36 +0000 (18:15 +0200)
index.cgi

index 4dbd1150a063ba93b4b5717f16c2e9cbcf8e401e..8359b637af1be01f3d67aaecb0ef67f958443938 100755 (executable)
--- 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"