Skip Menu |

This queue is for tickets about the Apache-WebDAV CPAN distribution.

Report information
The Basics
Id: 39219
Status: new
Priority: 0/
Queue: Apache-WebDAV

People
Owner: Nobody in particular
Requestors: peter [...] makholm.net
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.01
Fixed in: (no value)



Subject: COPY on a directory writes files with wrong content
Apache::WebDAV::copy() contains the following code for doing recursive copying: # Then copy over each file foreach my $file (reverse sort @files) { my $dest_file = $file; $dest_file =~ s/^$path/$destination/; my $fh = $handler->open_read($file); my $contents = join '', <$fh>; $handler->close_read($fh); # Don't write if the file exists and overwrite is FALSE if($handler->test('e', $dest_file) && $overwrite eq 'F') { return 401; } # Write the new file $fh = $handler->open_write($dest_file); print $fh $file; $handler->close_write($fh); } The second line below "#write the new file" is clearly wrong as $file is the name of the source file and not the content of the file. This line should read print $fh $contents instead.