diff --git a/filemanager/inc/class.filemanager_merge.inc.php b/filemanager/inc/class.filemanager_merge.inc.php index 55f9b0aa3a..a1fd4b5408 100644 --- a/filemanager/inc/class.filemanager_merge.inc.php +++ b/filemanager/inc/class.filemanager_merge.inc.php @@ -136,7 +136,19 @@ class filemanager_merge extends bo_merge } */ $link = egw_link::mime_open($file['url'], $file['mime']); - // Prepend site + if(is_array($link)) + { + // Directories have their internal protocol in path here + if($link['path'] && strpos($link['path'], '://') !== false) $link['path'] = $file['path']; + $link = egw_session::link('/index.php', $link); + } + else + { + // Regular files + $link = egw_session::link($link); + } + + // Prepend site, if missing if ($link{0} == '/') { $link = ($_SERVER['HTTPS'] || $GLOBALS['egw_info']['server']['enforce_ssl'] ? 'https://' : 'http://').