Subject: | Wrong space escaping in local (filenames) on 'MSWin32' |
Symptoms: 'put' always fail for '-local' path/files with spaces.
In HTTP\DAV.pm:
sub put {
my ( $self, @p ) = @_;
...
if ( ref($local) eq "SCALAR" ) {
...
}
else {
$self->_start_multi_op( 'put ' . $local, $callback );
$local =~ s/\ /\\ /g; # line 926
...
}
$self->_end_multi_op();
return $self->is_success;
}
In line 926 all spaces escaped with '\' symbol, but this don't work on 'MSWin32' platform.
Instead filenames with spaces must be quoted with in pair of ".
(https://support.microsoft.com/en-us/help/102739/long-filenames-or-paths-with-spaces-require-quotation-marks)
Solution like:
line 926: $local =~ s/\ /\\ /g if $^O ne 'MSWin32';
just work fine.
In my case '-local' parameter quoted explicitly before calling 'put'.