[Jifty-commit] r4592 - in jifty/trunk: lib/Jifty

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Nov 30 17:52:24 EST 2007


Author: sartak
Date: Fri Nov 30 17:52:24 2007
New Revision: 4592

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/lib/Jifty/Util.pm

Log:
 r48458 at onn:  sartak | 2007-11-30 17:52:18 -0500
 Bulletproof Jifty::Util->make_path


Modified: jifty/trunk/lib/Jifty/Util.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Util.pm	(original)
+++ jifty/trunk/lib/Jifty/Util.pm	Fri Nov 30 17:52:24 2007
@@ -226,7 +226,13 @@
     my $whole_path = shift;
     return 1 if (-d $whole_path);
     Jifty::Util->require('File::Path');
-    File::Path::mkpath([$whole_path]);
+
+    local $@;
+    eval { File::Path::mkpath([$whole_path]) };
+
+    if ($@) {
+        Jifty->log->fatal("Unable to make path: $whole_path: $@")
+    }
 }
 
 =head2 require PATH


More information about the Jifty-commit mailing list