Index: typo3/class.file_list.inc =================================================================== --- typo3/class.file_list.inc (revision 6691) +++ typo3/class.file_list.inc (working copy) @@ -409,8 +409,8 @@ */ function linkWrapFile($code,$path) { - if (t3lib_div::isFirstPartOfStr($path,t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT'))) { - $href = substr($path,strlen(t3lib_div::getIndpEnv('TYPO3_DOCUMENT_ROOT'))); + if (t3lib_div::isFirstPartOfStr($path, PATH_site)) { + $href = t3lib_div::getIndpEnv('TYPO3_SITE_URL') . substr($path, strlen(PATH_site)); $aOnClick = "return top.openUrlInWindow('".$href."','WebFile');"; $code = ''.t3lib_div::fixed_lgd_cs($code,$this->fixedL).''; }