Revision e436a6b0
Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt
SL/Common.pm | ||
---|---|---|
290 | 290 |
} else { |
291 | 291 |
my $base_path = substr($ENV{'SCRIPT_NAME'}, 1); |
292 | 292 |
$base_path =~ s|[^/]+$||; |
293 |
$base_path =~ s|/$||; |
|
293 | 294 |
|
294 |
foreach my $file (<$path/*>) { |
|
295 |
my $fname = $file; |
|
296 |
$fname =~ s|.*/||; |
|
297 |
$form->{WEBDAV}{$fname} = |
|
298 |
($ENV{"HTTPS"} ? "https://" : "http://") . |
|
299 |
$ENV{'SERVER_NAME'} . "/" . $base_path . $file; |
|
295 |
if (opendir $dir, $path) { |
|
296 |
foreach my $file (readdir $dir) { |
|
297 |
next if (($file eq '.') || ($file eq '..')); |
|
298 |
|
|
299 |
my $fname = $file; |
|
300 |
$fname =~ s|.*/||; |
|
301 |
|
|
302 |
my $physical_file = "$path/$file"; |
|
303 |
|
|
304 |
$file = join('/', map { $form->escape($_) } grep { $_ } split m|/+|, "$path/$file"); |
|
305 |
$file .= '/' if (-d $physical_file); |
|
306 |
|
|
307 |
$form->{WEBDAV}->{$fname} = ($ENV{"HTTPS"} ? "https://" : "http://") . $ENV{'SERVER_NAME'} . "/$base_path/$file"; |
|
308 |
} |
|
309 |
|
|
310 |
closedir $dir; |
|
300 | 311 |
} |
301 | 312 |
} |
302 | 313 |
|
Auch abrufbar als: Unified diff
Webdav: Wenn eine Pfadkomponente Leerzeichen enthielt (z.B. "Storno zu ..."), dann wurden komplett falsche Links erzeugt.