summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Huwald <jh@sotun.de>2014-11-05 14:43:18 (GMT)
committerJan Huwald <jh@sotun.de>2014-11-05 14:43:18 (GMT)
commit969660650110484c1aced8642778d11b03bd169c (patch)
tree88643ef8e34d661547f4621f474e5af65fd64f3d
parentec7e185f679cc48fd6ded8cec1f253bc19782150 (diff)
terminate if destination file already exists
Otherwise user might inadvertadly use the wrong file if he does not notice the error message.
-rwxr-xr-xanondcim2
1 files changed, 1 insertions, 1 deletions
diff --git a/anondcim b/anondcim
index d3f2483..df5d4b9 100755
--- a/anondcim
+++ b/anondcim
@@ -63,7 +63,7 @@ do
# always use a padded number as destination filename suffix
dst="$dst$file_prefix$(echo -n "0000000000$cur" | tail -c ${#total}).jpg"
echo "anonymizing \"$fn\" to \"$dst\" ($cur/$total)"
- [ -e "$dst" ] && { err "destination \"$dst\" for source \"$fn\" already exists, anonymization is skipped"; continue; }
+ [ ! -e "$dst" ] || die "destination \"$dst\" for source \"$fn\" already exists"
read w h << EOF
$(identify -format '%w %h' "$fn")
contact: Jan Huwald // Impressum