Mercurial > hgrepos > hgweb.cgi > s4
changeset 867:1b0669c854cf
Pathname handling fixed
author | HIROSE Yuuji <yuuji@gentei.org> |
---|---|
date | Sun, 06 Sep 2020 12:33:56 +0859 |
parents | a2e2bf4ee7eb |
children | 2eaa037f35d0 |
files | s4-blog.sh |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/s4-blog.sh Sun Sep 06 11:24:28 2020 +0859 +++ b/s4-blog.sh Sun Sep 06 12:33:56 2020 +0859 @@ -894,9 +894,9 @@ dir=`printf $bd/%d/%06d "$rid" "$rowid"` fi txt=`printf %06d $rowid`.txt - mkdir -p $dir - echo "$author" > $dir/Author - echo "$text" | unhexize > $dir/$txt + test -d "$dir" || mkdir -p "$dir" + echo "$author" > "$dir"/Author.txt + echo "$text" | unhexize > "$dir/$txt" i=0 query "SELECT m.rowid, m.val FROM article_m m \ WHERE id='$artid' AND m.key IN ('image', 'document', 'binary');" \