diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index cc4b2aac7f0..0767c13c9b1 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -285,7 +285,7 @@ function dol_buildpath($path, $type=0) if (! empty($regs[1])) { //print $key.'-'.$dirroot.'/'.$path.'-'.$conf->file->dol_url_root[$type].'
'."\n"; - if (file_exists($dirroot.'/'.$path)) + if (file_exists($dirroot.'/'.$regs[1])) { if ($type == 1) {