From 7b542731a11e3e5bcf135a6c499281c217932780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Mon, 3 Mar 2014 15:59:11 +0100 Subject: [PATCH] Made test pessimistic by default The test result was wrong if, for example, the path was wrong. The unlink() function being never called, it returned the default true value even if it didn't remove a file. --- htdocs/core/lib/files.lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 0af5e917cc5..553d275c466 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -832,7 +832,7 @@ function dol_delete_file($file,$disableglob=0,$nophperrors=0,$nohook=0,$object=n $error=0; //print "x".$file." ".$disableglob;exit; - $ok=true; + $ok=false; $file_osencoded=dol_osencode($file); // New filename encoded in OS filesystem encoding charset if (empty($disableglob) && ! empty($file_osencoded)) {