From 2a4ab756c1782cce621b53e9085b2176d77a32bc Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 3 Jul 2013 01:44:03 +0400 Subject: [PATCH] fixed another bug with paths starting with '-'... Signed-off-by: Alex A. Naanou --- scripts/process-archive.sh | 12 ++++++------ ui/files.js | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/process-archive.sh b/scripts/process-archive.sh index 4c3c5d07..e6f56b05 100755 --- a/scripts/process-archive.sh +++ b/scripts/process-archive.sh @@ -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 : diff --git a/ui/files.js b/ui/files.js index f6042bde..866456b6 100755 --- a/ui/files.js +++ b/ui/files.js @@ -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...