Subject: | Upward paths break some DAV clients. |
Attached is a patch which adds the File::Spec noupwards() call to strip
'.' and '..' from directory listings. These were causing Windows
Explorer DAV client to render an extra two directories in every listing.
Subject: | nds.patch |
=== local/Net-DAV-Server/lib/Net/DAV/Server.pm
==================================================================
--- local/Net-DAV-Server/lib/Net/DAV/Server.pm (revision 3999)
+++ local/Net-DAV-Server/lib/Net/DAV/Server.pm (local)
@@ -413,7 +413,7 @@
if (defined $depth && $depth eq 1 and $fs->test('d', $path)) {
my $p = $path;
$p .= '/' unless $p =~ m{/$};
- @paths = map { $p . $_ } $fs->list($path);
+ @paths = map { $p . $_ } File::Spec->no_upwards( $fs->list($path) );
push @paths, $path;
} else {
@paths = ($path);