From ac84f80b460db32e6a989a250b3fc1093680fe9a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 2 Aug 2013 16:35:14 +0200 Subject: [PATCH] =?utf8?q?Dateinamen=20im=20webdav=20aus=20utf8=20decoden.?= =?utf8?q?=20Nicht=20NFC=20normalisieren,=20die=20m=C3=BCssen=20hinterher?= =?utf8?q?=20als=20URLs=20funktionieren.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/Common.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SL/Common.pm b/SL/Common.pm index 733eb74d8..d6260251e 100644 --- a/SL/Common.pm +++ b/SL/Common.pm @@ -21,6 +21,7 @@ use File::Slurp; use File::Spec; use List::MoreUtils qw(apply); use POSIX (); +use Encode qw(decode); use SL::DBUtils; @@ -355,7 +356,7 @@ sub webdav_folder { my $base_path = $ENV{'SCRIPT_NAME'}; $base_path =~ s|[^/]+$||; if (opendir my $dir, $path) { - foreach my $file (sort { lc $a cmp lc $b } readdir $dir) { + foreach my $file (sort { lc $a cmp lc $b } map { decode("UTF-8", $_) } readdir $dir) { next if (($file eq '.') || ($file eq '..')); my $fname = $file; -- 2.20.1