]> git.plutz.net Git - serve0/blobdiff - db_meta.sh
bugfix: typo caused clearing of fields on update
[serve0] / db_meta.sh
index 0521ed9d44c6a3f56994fcb2948ece452c582f69..ddbe911181f1d49e2d6090681030359895daa164 100755 (executable)
@@ -47,7 +47,7 @@ read_meta() {
 
 update_meta(){
   local name="${1:=${META_NAME}}" tags comment length width height
-  eval LENGTH WIDTH HEIGH TAGS COMMENT NAME
+  local LENGTH WIDTH HEIGH TAGS COMMENT NAME
   local arg cnt meta_db="$_DATA/.index/meta"
 
   [ "${name%%/*}" != "$name" ] \
@@ -74,7 +74,7 @@ update_meta(){
                "$(STRING "${name-$(UNSTRING "${NAME%${CR}}")}")"
       else
         printf '%i     %i      %i      tags=%s comment=%s      %s\r\n' \
-               "$length" "$width" "$height" "${TAGS#tags=}" \
+               "$LENGTH" "$WIDTH" "$HEIGHT" "${TAGS#tags=}" \
                "${COMMENT#comment=}" "${NAME%${CR}}"
       fi
     done <"$meta_db" >"${meta_db}.$$"