diff options
author | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2015-11-25 22:53:00 -0500 |
---|---|---|
committer | Kjetil Orbekk <kjetil.orbekk@gmail.com> | 2015-11-25 22:53:00 -0500 |
commit | 8d3d2bcb4491c854592b90e3e404a4b44396190c (patch) | |
tree | 9d4b8009ae3cea4b05ad1dc402cd633372b7b9a2 | |
parent | 8fd075c7124a74e46341cad1c2d1b24f0937af4c (diff) |
Fix file check condition.
-rwxr-xr-x | import/photobox_import2.sh | 3 |
1 files changed, 2 insertions, 1 deletions
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 |