ports/www/w3mir/files/patch-w3http.pm
2005-04-17 19:29:58 +00:00

19 lines
623 B
Perl

--- w3http.pm.bak Mon Feb 5 00:21:47 2001
+++ w3http.pm Sun Apr 17 21:43:30 2005
@@ -551,13 +551,16 @@
# found at cool sites.
$save=1;
+ my($slash)=($saveto =~ /^\//);
# Find a temporary filename
$tmpf=url "file:$saveto";
$tmpf->basename($tmpfile);
$tmpf=$tmpf->unix_path;
+ $tmpf =~ s~^/~~ if (!$slash);
# Find suitable final filename, one with no URL escapes
$saveto=(url "file:$saveto")->unix_path;
+ $saveto =~ s~^/~~ if (!$slash);
# If output to stdout then send it directly there rather than
# using disk unnecesarily.