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

View File

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