Skip to content

Commit

Permalink
correctly catch dir creation error
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonéri Le Bouder committed May 26, 2012
1 parent 5dcbf27 commit 6ca4b94
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -19,10 +19,12 @@ sub do {
$logger->debug($m);
} else {
File::Path::mkpath($dir);
$status = 0 unless -d $dir;
my $m = "Failed to create $dir directory";
push @$msg, $m;
$logger->debug($m);
if (!-d $dir) {
$status = 0;
my $m = "Failed to create $dir directory";
push @$msg, $m;
$logger->debug($m);
}
}
}
return {
Expand Down

0 comments on commit 6ca4b94

Please sign in to comment.