Fix: if the file size is larger than the limitation, the antivirus returns an error because it can not find the file

This commit is contained in:
Regis Houssin 2010-01-08 11:01:01 +00:00
parent 230ed395be
commit 5c9b6a2866

View File

@ -1942,7 +1942,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite)
$file_name = $dest_file;
// If we need to make a virus scan
if ($conf->global->MAIN_ANTIVIRUS_COMMAND)
if (file_exists($src_file) && $conf->global->MAIN_ANTIVIRUS_COMMAND)
{
require_once(DOL_DOCUMENT_ROOT.'/lib/security.lib.php');
require_once(DOL_DOCUMENT_ROOT.'/lib/antivir.class.php');