From 5c9b6a28663c21290f91cdeaa69feed0dd9937b7 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 8 Jan 2010 11:01:01 +0000 Subject: [PATCH] Fix: if the file size is larger than the limitation, the antivirus returns an error because it can not find the file --- htdocs/lib/functions.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index 5792b5cdfde..40b3265ba30 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -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');