]> git.plutz.net Git - serve0/commitdiff
bugfix: avoid DB damage when updating nonexist file
authorPaul Hänsch <paul@plutz.net>
Mon, 23 Aug 2021 13:45:31 +0000 (15:45 +0200)
committerPaul Hänsch <paul@plutz.net>
Mon, 23 Aug 2021 13:45:31 +0000 (15:45 +0200)
multitag.sh

index 353ead6dbf838d331d25c45a24ce41a2a34d181c..9848ac3e34bcd30613e7d7add918e11c5ab06b16 100644 (file)
@@ -21,6 +21,7 @@ for select in $(seq 1 $(POST_COUNT select)); do
   read -r length width height tags comment fn <<-EOF
        $(meta_info "$file")
        EOF
   read -r length width height tags comment fn <<-EOF
        $(meta_info "$file")
        EOF
+  [ "$fn" ] || continue
   tags="$(UNSTRING "${tags#tags=}" |tr , '\n')"
 
   if [ ! "$deltags" ]; then
   tags="$(UNSTRING "${tags#tags=}" |tr , '\n')"
 
   if [ ! "$deltags" ]; then