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 diff
     1.1 --- a/s4-blog.sh	Sun Sep 06 11:24:28 2020 +0859
     1.2 +++ b/s4-blog.sh	Sun Sep 06 12:33:56 2020 +0859
     1.3 @@ -894,9 +894,9 @@
     1.4        dir=`printf $bd/%d/%06d "$rid" "$rowid"`
     1.5      fi
     1.6      txt=`printf %06d $rowid`.txt
     1.7 -    mkdir -p $dir
     1.8 -    echo "$author" > $dir/Author
     1.9 -    echo "$text" | unhexize > $dir/$txt
    1.10 +    test -d "$dir" || mkdir -p "$dir"
    1.11 +    echo "$author" > "$dir"/Author.txt
    1.12 +    echo "$text" | unhexize > "$dir/$txt"
    1.13      i=0
    1.14      query "SELECT m.rowid, m.val FROM article_m m \
    1.15  	   WHERE id='$artid' AND m.key IN ('image', 'document', 'binary');" \