diff --git a/plugins/dynamix/Browse.page b/plugins/dynamix/Browse.page index 531d36fb7..f30d65113 100644 --- a/plugins/dynamix/Browse.page +++ b/plugins/dynamix/Browse.page @@ -23,6 +23,7 @@ function sort_by($field, $opt, $show_disk) { // read directory contents into 'list' array global $docroot,$dir; $path = $docroot.preg_replace('/([\'" &()[\]\\\\])/','\\\\$1',$dir).'/*'; + file_put_contents('/tmp/test',$path); $file = array(); $disk = array(); $list = array(); $i = 0; exec("shopt -s dotglob ; stat -L -c'%F|%n|%s|%Y' $path 2>/dev/null", $file); @@ -32,10 +33,11 @@ function sort_by($field, $opt, $show_disk) { $disk = array_fill(0, max(count($file),1), ''); foreach ($file as $entry) { $attr = explode('|', $entry); + $info = pathinfo($attr[1]); $list[] = array( 'type' => $attr[0], - 'name' => basename($attr[1]), - 'fext' => strtolower(pathinfo($attr[1],PATHINFO_EXTENSION)), + 'name' => $info['basename'], + 'fext' => strtolower($info['extension']), 'size' => $attr[2], 'time' => $attr[3], 'disk' => my_disk($disk[$i++])); @@ -126,7 +128,7 @@ $disk_order=($column=='disk'?$order:'A'); $total+=$entry['size']; $warn = substr($entry['disk'],-1)=="*" ? ' class="warning"' : ''; ?>