mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-26 05:02:18 +00:00
Properly copy files with % and & in the names
Submitted by: Dirk Meyer <dirk.meyer@dinoex.sub.org>
This commit is contained in:
parent
fbc36fc9f8
commit
80bd9d6949
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=8823
34
www/webcopy/files/patch-ac
Normal file
34
www/webcopy/files/patch-ac
Normal file
@ -0,0 +1,34 @@
|
||||
*** webcopy.src Sat Nov 1 11:00:23 1997
|
||||
--- webcopy.src.neu Sat Nov 1 13:48:20 1997
|
||||
***************
|
||||
*** 384,389 ****
|
||||
--- 384,390 ----
|
||||
return;
|
||||
}
|
||||
}
|
||||
+ $ref =~ s/&/&/;
|
||||
$ref="$path$ref" unless $ref=~m!^/!;
|
||||
($ref,$qs)=$ref=~m!^([^?]*)(.*)$!;
|
||||
$isdir=$ref=~m!/$!;
|
||||
***************
|
||||
*** 454,459 ****
|
||||
--- 455,461 ----
|
||||
|
||||
sub transfer {
|
||||
local($url,$file)=@_;
|
||||
+ $file=&unescape($file);
|
||||
local($status,$code,$info,$line,$length,$html,$redirect,$update,$data,
|
||||
$bytes,$step,$slice);
|
||||
if ($useremote) {
|
||||
***************
|
||||
*** 560,565 ****
|
||||
--- 562,568 ----
|
||||
local(@subdirs)=split('/',$path);
|
||||
local($sub);
|
||||
$name=pop(@subdirs); # get name of file from path
|
||||
+ $name=&unescape($name);
|
||||
for $sub (@subdirs) {
|
||||
$dir.= "/".&unescape($sub);
|
||||
stat(&real($dir));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user