From 8d3d2bcb4491c854592b90e3e404a4b44396190c Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Wed, 25 Nov 2015 22:53:00 -0500 Subject: Fix file check condition. --- import/photobox_import2.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/import/photobox_import2.sh b/import/photobox_import2.sh index 8108bcc..a189405 100755 --- a/import/photobox_import2.sh +++ b/import/photobox_import2.sh @@ -23,9 +23,10 @@ readonly pending_path="$(make_unique $pending_root/$(date +%Y-%m-%d))" ( flock -x -w 120 200 || exit 1 - if [[ ! -d "$backup_path/DCIM" && \ + if [[ ! -d "$backup_path/DCIM" || \ -z $(find "$backup_path/DCIM" -iregex "$photoregex" -print -quit | head) ]]; then echo "No photos found on $input" + umount "${input}" exit 0 fi -- cgit v1.2.3