2871c2871 < $fileArr = t3lib_div::getAllFilesAndFoldersInPath(array(),$removePath); --- > $fileArr = t3lib_div::getAllFilesAndFoldersInPath(array(),$removePath, '', 1); 3004a3005,3006 > // get pathinfo > 3006,3007c3008,3027 < if (strcmp($pI['dirname'],'') && strcmp($pI['dirname'],'.')) { < $dirs[$pI['dirname'].'/'] = $pI['dirname'].'/'; --- > $dir_name = $pI['dirname']; > > if (!isset($dirs[$dir_name]) && $dir_name && $dir_name != '.' && $dir_name != '/') { > $dir_name .= '/'; > > // add the outermost directory > > $dirs[$dir_name] = $dir_name; > > // check for directories in the path > > $pI = pathinfo($dir_name); > $dir_name = $pI['dirname']; > while ($dir_name && $dir_name != '.' && $dir_name != '/' && FALSE !== strpos($dir_name, '/')) { > $dir_name = $pI['dirname'].'/'; > $dirs[$dir_name] = $dir_name; > > $pI = pathinfo($dir_name); > $dir_name = $pI['dirname']; > }