M: Check for defined command line argument.

This commit is contained in:
Jens Luedicke
2013-03-10 15:50:35 +01:00
parent c2ce754d59
commit 538260b627

View File

@@ -31,9 +31,10 @@ $dw->onDirLeave(sub {
return SUCCESS;
});
if (-e $ARGV[0]) {
$dw->walk($ARGV[0]);
} else {
my $cwd = getcwd();
$dw->walk($cwd);
my $path = cwd();
if ((defined $ARGV[0]) and (-e $ARGV[0])) {
$path = $ARGV[0];
}
$dw->walk($path);