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.