* Filemanager popup: fixed sometimes missing first directory, eg. in favorites

caused by removing the first entry, which is not garantied to be the directory itself, as we sort by name
This commit is contained in:
Ralf Becker 2011-08-04 15:44:52 +00:00
parent 3819816248
commit b4d761b571

View File

@ -233,9 +233,10 @@ class filemanager_select
{
$n = 0;
$content['dir'] = array('mode' => $content['mode']);
array_shift($files); // remove directory itself
foreach($files as $path)
{
if ($path == $content['path']) continue; // remove directory itself
$name = egw_vfs::basename($path);
$is_dir = egw_vfs::is_dir($path);
if ($content['mime'] && !$is_dir && egw_vfs::mime_content_type($path) != $content['mime'])