[interchange-cvs] interchange - racke modified lib/Vend/File.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Thu Nov 13 10:12:50 EST 2003
User: racke
Date: 2003-11-13 15:12:50 GMT
Modified: lib/Vend File.pm
Log:
somehow mkpath stops the eval without leaving something in $@
in case of permissions problems - i suspect it's caused by the
croak invocation
verified with Perl 5.6.1
Revision Changes Path
2.12 +6 -3 interchange/lib/Vend/File.pm
rev 2.12, prev_rev 2.11
Index: File.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/File.pm,v
retrieving revision 2.11
retrieving revision 2.12
diff -u -r2.11 -r2.12
--- File.pm 25 Jun 2003 16:38:17 -0000 2.11
+++ File.pm 13 Nov 2003 15:12:49 -0000 2.12
@@ -1,6 +1,6 @@
# Vend::File - Interchange file functions
#
-# $Id: File.pm,v 2.11 2003/06/25 16:38:17 mheins Exp $
+# $Id: File.pm,v 2.12 2003/11/13 15:12:49 racke Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -53,7 +53,7 @@
use Vend::Util;
use subs qw(logError logGlobal);
use vars qw($VERSION @EXPORT @EXPORT_OK $errstr);
-$VERSION = substr(q$Revision: 2.11 $, 10);
+$VERSION = substr(q$Revision: 2.12 $, 10);
sub writefile {
my($file, $data, $opt) = @_;
@@ -72,7 +72,10 @@
$dir =~ s:[\r\n]::g; # Just in case
$dir =~ s:(.*)/.*:$1: or $dir = '';
if($dir and ! -d $dir) {
- File::Path::mkpath($dir);
+ eval{
+ File::Path::mkpath($dir);
+ };
+ die "mkpath\n" unless -d $dir;
}
}
# We have checked for beginning > or | previously
More information about the interchange-cvs
mailing list