sbotools2

Maintenance fork of the original sbotools version 2
Log | Files | Refs | README

commit 613322b4a677032d82596985b3995027cc1991ba
parent 30065a240f6f58cb7e7d4f5663402b40c07b8aef
Author: Andreas Guldstrand <andreas.guldstrand@gmail.com>
Date:   Thu, 28 Apr 2016 20:28:40 +0200

sboclean: Change dir check into an actual if

Diffstat:
Msboclean | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sboclean b/sboclean @@ -71,7 +71,10 @@ sub rm_full { sub remove_stuff { script_error 'remove_stuff requires an argument.' unless @_ == 1; my $dir = shift; - -d $dir or say 'Nothing to do.' and return 0; + if (not -d $dir) { + say 'Nothing to do.'; + return 0; + } opendir(my $dh, $dir); FIRST: while (my $ls = readdir $dh) { next FIRST if in($ls => qw/ . .. /);