Revision ac84f80b
Von Sven Schöling vor mehr als 11 Jahren hinzugefügt
SL/Common.pm | ||
---|---|---|
use File::Spec;
|
||
use List::MoreUtils qw(apply);
|
||
use POSIX ();
|
||
use Encode qw(decode);
|
||
|
||
use SL::DBUtils;
|
||
|
||
... | ... | |
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;
|
Auch abrufbar als: Unified diff
Dateinamen im webdav aus utf8 decoden. Nicht NFC normalisieren, die müssen hinterher als URLs funktionieren.