fixed another bug with paths starting with '-'...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-07-03 01:44:03 +04:00
parent b9c22d7781
commit 2a4ab756c1
2 changed files with 7 additions and 7 deletions

View File

@ -50,13 +50,13 @@ makepreview(){
OUT="$3" OUT="$3"
# create preview dir if it does not already exist... # create preview dir if it does not already exist...
DIR="`dirname \"${OUT}\"`" DIR="`dirname \"./${OUT}\"`"
if ! [ -e "$DIR" ] ; then if ! [ -e "./$DIR" ] ; then
mkdir -p "$DIR" mkdir -p "./$DIR"
fi fi
# create previews... # create previews...
if ! [ -e "${OUT}" ] ; then if ! [ -e "./${OUT}" ] ; then
# get source size... # get source size...
W=$(vips im_header_int width "$IN") W=$(vips im_header_int width "$IN")
@ -71,7 +71,7 @@ makepreview(){
echo "($FACTOR): ${OUT}:${COMPRESSION}" echo "($FACTOR): ${OUT}:${COMPRESSION}"
vips im_shrink "$IN" "${OUT}:${COMPRESSION}" $FACTOR $FACTOR 2> /dev/null vips im_shrink "./$IN" "./${OUT}:${COMPRESSION}" $FACTOR $FACTOR 2> /dev/null
fi fi
} }
@ -84,7 +84,7 @@ for FROM in */DCIM/hi-res\ \(RAW\)/*jpg ; do
TO="${FROM/hi-res\ /preview }" TO="${FROM/hi-res\ /preview }"
# XXX do different-sized previews... # XXX do different-sized previews...
makepreview "$SIZE" "./$FROM" "$TO" makepreview "$SIZE" "./$FROM" "./$TO"
done done
# vim:set nowrap nospell : # vim:set nowrap nospell :

View File

@ -608,7 +608,7 @@ function exportTo(path, im_name, dir_name, size){
// global order... // global order...
var o = order.indexOf(gid) + '' var o = order.indexOf(gid) + ''
dest = dest.replace('%I', (Z + o).slice(o.length)) dest = dest.replace('%I', (Z + o).slice(o.length))
// // current order...
var o = selection.indexOf(gid) + '' var o = selection.indexOf(gid) + ''
dest = dest.replace('%i', (z + o).slice(o.length)) dest = dest.replace('%i', (z + o).slice(o.length))
// XXX Metadata... // XXX Metadata...