Fixed _realpath() for UNC pathes like '\\examplepath\mypath' (will become '//examplepath/mypath'). See #1.

Here is a comparison between the output of the old and new version of _realpath():

Input: '/a/b/c/' Output old: '/a/b/c/' Output new: '/a/b/c'
Input: '//a/b/c' Output old: '/a/b/c'  Output new: '//a/b/c'
Input: 'a//b'    Output old: 'a/b'     Output new: 'a//b'
This commit is contained in:
LarsDW223
2016-05-13 22:00:54 +02:00
parent 64cebf9c73
commit ec306048e5

View File

@@ -886,8 +886,8 @@ class syntax_plugin_filelist extends DokuWiki_Syntax_Plugin {
$path=explode('/', $path);
$output=array();
for ($i=0; $i<sizeof($path); $i++) {
if (('' == $path[$i] && $i > 0) || '.' == $path[$i]) continue;
if ('..' == $path[$i] && $i > 0 && '..' != $output[sizeof($output) - 1]) {
if ('.' == $path[$i]) continue;
if ('..' == $path[$i] && '..' != $output[sizeof($output) - 1]) {
array_pop($output);
continue;
}