This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id:
3201
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
ANDK [...] cpan.org
Requestors:
roland.bauer [...] gmx.at
Cc:
AdminCc:

BugTracker
Severity:
Important
Broken in:
1.76
Fixed in:
(no value)



Subject: Filenames with blank
The attached patch fixes a problem with filenames containig blanks (like in "C:\Dokumente und Einstellungen\Besitzer\.cpan") Regards Roland

Message body not shown because it is not plain text.

Subject: Filenames with blank (still broken on Win32)
The bug still persists in the 5.8.1-distributed release (1.76_01), and the above fix by roland.bauer@gmx.at only fixes the problem for tar.exe and not for gzip.exe . My below patch also (tries to) fix tar.exe and/or gzip.exe living in a directory with spaces in the path (bad idea, but ...). I'm sorry that I didn't come up with a good test case/test file for the distribution... Thanks, -max (Corion) --- CPAN-old.pm 2003-10-12 13:29:31.000000000 +0200 +++ CPAN.pm 2003-10-12 13:53:05.000000000 +0200 @@ -5655,7 +5655,7 @@ $fhw->close; return 1; } else { - system("$CPAN::Config->{gzip} -c $read > $write")==0; + system(qq{"$CPAN::Config->{gzip}" -c "$read" > "$write"})==0; } } @@ -5677,7 +5677,7 @@ $fhw->close; return 1; } else { - system("$CPAN::Config->{gzip} -dc $read > $write")==0; + system(qq{"$CPAN::Config->{gzip}" -dc "$read" > "$write"})==0; } } @@ -5708,7 +5708,7 @@ CPAN->debug("err[$err]success[$success]") if $CPAN::DEBUG; return $success; } else { - return system("$CPAN::Config->{gzip} -dt $read")==0; + return system(qq{$CPAN::Config->{gzip} -dt "$read"})==0; } } @@ -5723,7 +5723,7 @@ die "Could not gzopen $file"; $ret = bless {GZ => $gz}, $class; } else { - my $pipe = "$CPAN::Config->{gzip} --decompress --stdout $file |"; + my $pipe = qq{$CPAN::Config->{gzip} --decompress --stdout "$file" |}; my $fh = FileHandle->new($pipe) or die "Could not pipe[$pipe]: $!"; binmode $fh; $ret = bless {FH => $fh}, $class; @@ -5807,11 +5807,11 @@ my($system); my $is_compressed = $class->gtest($file); if ($is_compressed) { - $system = "$CPAN::Config->{gzip} --decompress --stdout " . - "< $file | $CPAN::Config->{tar} xvf -"; + $system = qq{$CPAN::Config->{gzip} --decompress --stdout } . + qq{< "$file" | $CPAN::Config->{tar} xvf -}; } else { - $system = "$CPAN::Config->{tar} xvf $file"; - } + $system = qq{$CPAN::Config->{tar} xvf "$file"}; + }; if (system($system) != 0) { # people find the most curious tar binaries that cannot handle # pipes @@ -5824,7 +5824,7 @@ } $file = $ungzf; } - $system = "$CPAN::Config->{tar} xvf $file"; + $system = qq{"$CPAN::Config->{tar}" xvf "$file"}; $CPAN::Frontend->myprint(qq{Using Tar:$system:\n}); if (system($system)==0) { $CPAN::Frontend->myprint(qq{Untarred $file successfully\n});
[CORION - Sun Oct 12 07:43:27 2003]:
Show quoted text
> My below patch also (tries to) fix tar.exe and/or gzip.exe living in a > directory with spaces in the path (bad idea, but ...).
Aaah, the joys of reading after posting - of course, the patch is broken in the sense that not all invocations of tar / gzip are using double quotes... Bah. Have fun, -max


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.