changeset 42:0e3164b11ec0

Illegal use of $tmpd fixed in blog_showentry
author HIROSE Yuuji <yuuji@gentei.org>
date Wed, 22 Jul 2015 16:42:21 +0900
parents ce13cad6b99d
children 7defa2416356
files s4-blog.sh
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/s4-blog.sh	Wed Jul 22 16:36:08 2015 +0900
+++ b/s4-blog.sh	Wed Jul 22 16:42:21 2015 +0900
@@ -31,10 +31,11 @@
   # $1=table $2=rowid
   if [ -n "$2" ]; then
     if [ -n "$imgcached" ]; then
-      tmpd=$tmpdir/$imgcached/$thumbxy
+      bstmpdir=$tmpdir/$imgcached/$thumbxy
     else
-      tmpd=`mktempd`
-      tmpfiles=$tmpfiles" $tmpd"
+      bstmpdir=$tmpd
+      # tmpd=`mktempd`
+      # tmpfiles=$tmpfiles" $tmpd"
     fi
   fi
   tbl=${1%%[!A-Z0-9a-z_]*} rowid=${2%%[!A-Z0-9a-z_]*}
@@ -126,7 +127,7 @@
     arid=${a%%|*} aid=`echo "$a"|cut -d'|' -f2` author=${a##*|} imgs=""
 err a=$a, aid=$aid, author=$author
     # name=''	# Get gecos??
-    td=$(echo $tmpd/`echo $a|md5`)
+    td=$(echo $bstmpdir/`echo $a|md5`)
     val=`getvalbyid article image $arid $td`
 err val="[$val]" and td as follows:
     

yatex.org