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:
@@ -886,8 +886,8 @@ class syntax_plugin_filelist extends DokuWiki_Syntax_Plugin {
|
|||||||
$path=explode('/', $path);
|
$path=explode('/', $path);
|
||||||
$output=array();
|
$output=array();
|
||||||
for ($i=0; $i<sizeof($path); $i++) {
|
for ($i=0; $i<sizeof($path); $i++) {
|
||||||
if (('' == $path[$i] && $i > 0) || '.' == $path[$i]) continue;
|
if ('.' == $path[$i]) continue;
|
||||||
if ('..' == $path[$i] && $i > 0 && '..' != $output[sizeof($output) - 1]) {
|
if ('..' == $path[$i] && '..' != $output[sizeof($output) - 1]) {
|
||||||
array_pop($output);
|
array_pop($output);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user