aboutsummaryrefslogtreecommitdiff
path: root/renrot
diff options
context:
space:
mode:
authorZeus Panchenko <zeus@camb.us>2008-09-12 07:00:28 +0000
committerZeus Panchenko <zeus@camb.us>2008-09-12 07:00:28 +0000
commit5d53877bc6bd11cad8eec92aca6c718793194352 (patch)
treec4f5cb2fcba49e2dded711a26758942a9624d0c4 /renrot
parentbff711bb2b4f35952914432ae663136dc482d05d (diff)
downloadrenrot-5d53877bc6bd11cad8eec92aca6c718793194352.tar.gz
renrot-5d53877bc6bd11cad8eec92aca6c718793194352.tar.bz2
makeDir() rewritten to use File::Path module, to implement recursive mkdir
git-svn-id: file:///svnroot/renrot/trunk@568 fe2816f4-e837-0410-b10a-f608c9d244a1
Diffstat (limited to 'renrot')
-rwxr-xr-xrenrot7
1 files changed, 5 insertions, 2 deletions
diff --git a/renrot b/renrot
index 67c313e..0069cba 100755
--- a/renrot
+++ b/renrot
@@ -17,7 +17,7 @@ use Time::Local;
use Image::ExifTool;
use Getopt::Long;
use File::Spec;
-
+use File::Path;
use Term::ANSIColor;
$Term::ANSIColor::AUTORESET = 1;
@@ -1624,7 +1624,10 @@ sub colorValidator {
sub makeDir {
my $new_dir = shift;
if (not -d $new_dir) {
- unless (mkdir $new_dir) { errmsg ("$new_dir wasn't created! Perhaps the path contains nonexistent subdirectories...\n"); }
+ eval { mkpath( $new_dir, 0, 0700) };
+ if ($@) {
+ errmsg ("Couldn't create $new_dir: $@");
+ }
}
}

Return to:

Send suggestions and report system problems to the System administrator.