X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=storage.sh;h=61eec88fb2cee63f706a634eaa48c85a09ef1967;hb=38702dbb48387609925572f2269b222f87eb9c1a;hp=82d3d77b8edf9e34cb237aa685a8228b8fd0d150;hpb=49b4c44fb341804acf0165105e2234c2e57d1a67;p=cgilite diff --git a/storage.sh b/storage.sh index 82d3d77..61eec88 100755 --- a/storage.sh +++ b/storage.sh @@ -105,7 +105,7 @@ UNSTRING(){ \\n*) out="${out}${BR}"; in="${in#\\n}" ;; \\r*) out="${out}${CR}"; in="${in#\\r}" ;; \\t*) out="${out} "; in="${in#\\t}" ;; - \\+) out="${out}+"; in="${in#\\+}" ;; + \\+*) out="${out}+"; in="${in#\\+}" ;; +*) out="${out} "; in="${in#+}" ;; \\*) in="${in#\\}" ;; *) out="${out}${in%%[\\+]*}"; in="${in#"${in%%[\\+]*}"}" ;; @@ -161,7 +161,7 @@ DBM() { update|replace) k="$1" key="$(STRING "$1")" value="$(STRING "$2")" LOCK "$file" || return 1 - if ! DBM check "$k"; then + if ! DBM "$file" check "$k"; then RELEASE "$file" return 1 fi @@ -178,7 +178,7 @@ DBM() { append) key="$(STRING "$1")" value="$(STRING "$2")" LOCK "$file" || return 1 - if ! DBM check "$1"; then + if ! DBM "$file" check "$1"; then RELEASE "$file" return 1 fi