New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File::Path::mkpath on dosish system #828
Comments
From horst_fickenscher@sepp.deCreated by horst_fickenscher@sepp.deFile::Path::mkpath("X:\\foobar") will never return and eat up This is not a standard Perl Unix bug, but it's a standard Horst Perl Info
|
From @gsarOn Tue, 09 Nov 1999 12:01:10 +0100, Horst Fickenscher wrote:
Here's a fix. Sarathy Inline Patch-----------------------------------8<-----------------------------------
Change 4651 by gsar@onru on 1999/12/05 09:01:19
on dosish platforms, avoid infinite recursion in File::Path::mkpath()
when given non-existent drive names
Affected files ...
... //depot/perl/lib/File/Path.pm#16 edit
Differences ...
==== //depot/perl/lib/File/Path.pm#16 (text) ====
Index: perl/lib/File/Path.pm
--- perl/lib/File/Path.pm.~1~ Sun Dec 5 01:04:21 1999
+++ perl/lib/File/Path.pm Sun Dec 5 01:04:21 1999
@@ -126,13 +126,15 @@
my $parent = File::Basename::dirname($path);
# Allow for creation of new logical filesystems under VMS
if (not $Is_VMS or $parent !~ m:/[^/]+/000000/?:) {
- push(@created,mkpath($parent, $verbose, $mode)) unless (-d $parent);
+ unless (-d $parent or $path eq $parent) {
+ push(@created,mkpath($parent, $verbose, $mode));
+ }
}
print "mkdir $path\n" if $verbose;
unless (mkdir($path,$mode)) {
- my $e = $!;
- # allow for another process to have created it meanwhile
- croak "mkdir $path: $e" unless -d $path;
+ my $e = $!;
+ # allow for another process to have created it meanwhile
+ croak "mkdir $path: $e" unless -d $path;
}
push(@created, $path);
}
End of Patch. |
Migrated from rt.perl.org#1756 (status was 'resolved')
Searchable as RT1756$
The text was updated successfully, but these errors were encountered: