From b4d761b5712bd39f82ec47904816a6e95ebe72d8 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 4 Aug 2011 15:44:52 +0000 Subject: [PATCH] * 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 --- filemanager/inc/class.filemanager_select.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/filemanager/inc/class.filemanager_select.inc.php b/filemanager/inc/class.filemanager_select.inc.php index e84ace86da..92a675cbbc 100644 --- a/filemanager/inc/class.filemanager_select.inc.php +++ b/filemanager/inc/class.filemanager_select.inc.php @@ -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'])