]> git.plutz.net Git - serve0/blobdiff - multitag.sh
use grep for fast file search
[serve0] / multitag.sh
old mode 100644 (file)
new mode 100755 (executable)
index c9a7e8f..9848ac3
@@ -14,8 +14,6 @@ while [ "${newtags%${BR}}" != "${newtags}" ]; do newtags="${newtags%${BR}}"; don
 
 [ "$(POST op)" = del ] && deltags="$newtags"
 
-echo "x $newtags x" >&2
-
 for select in $(seq 1 $(POST_COUNT select)); do
   file="$_DATA/$ITEM/$(POST select $select |PATH)"
   meta="${file%/*}/.index/meta"
@@ -23,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
+  [ "$fn" ] || continue
   tags="$(UNSTRING "${tags#tags=}" |tr , '\n')"
 
   if [ ! "$deltags" ]; then