From f42a5a248933bab35e942141caf70a7f73bc1272 Mon Sep 17 00:00:00 2001 From: Thomas Levine <_@thomaslevine.com> Date: Sun, 28 Feb 2016 12:35:27 +0000 Subject: [PATCH] fix empty directories --- tests/Empty directories | 8 ++++++++ urchin | 4 ++++ 2 files changed, 12 insertions(+) create mode 100755 tests/Empty directories diff --git a/tests/Empty directories b/tests/Empty directories new file mode 100755 index 0000000..31e16cf --- /dev/null +++ b/tests/Empty directories @@ -0,0 +1,8 @@ +#!/bin/sh + +tmp=$(mktemp -d) +mkdir -p $tmp/test +../urchin $tmp/test +exit_code=$? +rm -R $tmp +exit $exit_code diff --git a/urchin b/urchin index ad57453..eda9ed5 100755 --- a/urchin +++ b/urchin @@ -106,6 +106,10 @@ recurse() { fi for test in *; do + if test "$test" = '*' && ! test -e $test; then + # The directory is empty. + break + fi urchin_source setup set +e