aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2014-05-26 13:22:03 +1200
committerTom Ryder <tom@sanctum.geek.nz>2014-05-26 13:22:03 +1200
commitf4fbe2c167024b26fcbcdec67225ba26426253b8 (patch)
tree8d9b002dd72229b0ebabe05a75fdabc944f9710a
parentDon't create parent directories (diff)
downloadnwatch-f4fbe2c167024b26fcbcdec67225ba26426253b8.tar.gz
nwatch-f4fbe2c167024b26fcbcdec67225ba26426253b8.zip
Correct reversed directory existence test
-rwxr-xr-xbin/nwatch2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/nwatch b/bin/nwatch
index c89c886..e5754c4 100755
--- a/bin/nwatch
+++ b/bin/nwatch
@@ -35,7 +35,7 @@ cachedir=${2:?}
latest=$cachedir/${self}.scan.latest
# If the cachedir doesn't exist, attempt to create it, otherwise give up
-if [[ -d "$cachedir" ]] ; then
+if [[ ! -d "$cachedir" ]] ; then
if ! mkdir -- "$cachedir" ; then
exit
fi