Skip Menu |

This queue is for tickets about the HTTP-DAV CPAN distribution.

Report information
The Basics
Id: 39150
Status: resolved
Worked: 1.5 hours (90 min)
Priority: 0/
Queue: HTTP-DAV

People
Owner: Nobody in particular
Requestors: shallyee [...] myit.jp
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.33
Fixed in: (no value)



Subject: Bug of getting multi-file to local directory
I call 'get' method to copy files to local current directory like, $my_dav->get(-url=>'*', -to=>'.'); But this cause only last file saved by the name of first file. I noticed that following code inside the get loop in get method. if (-d $to) { $to=~ s/\/$//g; $to = "$to/$leafname"; } elsif ( !defined $to || $to eq "" ) { $to = $leafname; } For the first glob, because $to is a directory, $to because "$to/ $leafname", and for the remained file, $to keeps same value. The caused all other files saved as the same file name. Please check. Thanks.
On Mer. 10 Set. 2008 03:25:53, shallyee wrote: Show quoted text
> I call 'get' method to copy files to local current directory like, > $my_dav->get(-url=>'*', -to=>'.'); > > But this cause only last file saved by the name of first file. I > noticed that following code inside the get loop in get method. > > if (-d $to) { > $to=~ s/\/$//g; > $to = "$to/$leafname"; > } elsif ( !defined $to || $to eq "" ) { > $to = $leafname; > } > > For the first glob, because $to is a directory, $to because "$to/ > $leafname", and for the remained file, $to keeps same value. The > caused all other files saved as the same file name. > > Please check. Thanks.
Thanks for the detailed report. Can you please try the attached DAV.pm ? It should fix your problem. Please let me know, thanks!

Message body is not shown because it is too large.

From: shallyee [...] myit.jp
On 水曜日 9月 10 17:09:14 2008, COSIMO wrote: Show quoted text
> Thanks for the detailed report. > Can you please try the attached DAV.pm ? > It should fix your problem. > > Please let me know, thanks!
The new module works fine. Thanks for your quick response. Hope the new one can be released to the public soon. Thanks!
HTTP-DAV v0.34 is on its way to CPAN mirrors. Thanks for your bug report.