"dont return mountpoints (like eg. /apps) twice"

This commit is contained in:
Ralf Becker 2008-05-10 21:47:16 +00:00
parent 5cfc38b4f6
commit 48352f6963

View File

@ -647,8 +647,9 @@ class vfs_stream_wrapper implements iface_stream_wrapper
do {
$file = readdir($this->opened_dir);
}
while($file !== false && self::HIDE_UNREADABLES && !$this->opened_dir_writable &&
!egw_vfs::check_access(egw_vfs::concat($this->opened_dir_url,$file),egw_vfs::READABLE));
while($file !== false && (is_array($this->extra_dirs) && in_array($file,$this->extra_dirs) || // dont return mountpoints twice
self::HIDE_UNREADABLES && !$this->opened_dir_writable &&
!egw_vfs::check_access(egw_vfs::concat($this->opened_dir_url,$file),egw_vfs::READABLE)));
return $file;
}