From 1da99a8fcd9419f422acac1464c44106a8bf998e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 10 Sep 2020 15:49:13 +0200 Subject: [PATCH] Add log to debug travis error --- htdocs/core/lib/files.lib.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index fb6f25eee4b..0296aa7acbe 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1168,18 +1168,20 @@ function dol_delete_file($file, $disableglob = 0, $nophperrors = 0, $nohook = 0, $reshook = $hookmanager->executeHooks('deleteFile', $parameters, $object); } - if (empty($nohook) && $reshook != 0) // reshook = 0 to do standard actions, 1 = ok, -1 = ko + if (empty($nohook) && $reshook != 0) // reshook = 0 to do standard actions, 1 = ok and replace, -1 = ko { if ($reshook < 0) return false; return true; } else { //print "x".$file." ".$disableglob;exit; + dol_syslog("reshook=".$reshook); $file_osencoded = dol_osencode($file); // New filename encoded in OS filesystem encoding charset if (empty($disableglob) && !empty($file_osencoded)) { $ok = true; $globencoded = str_replace('[', '\[', $file_osencoded); $globencoded = str_replace(']', '\]', $globencoded); + dol_syslog("globencoded=".$globencoded); $listofdir = glob($globencoded); if (!empty($listofdir) && is_array($listofdir)) { @@ -1220,7 +1222,9 @@ function dol_delete_file($file, $disableglob = 0, $nophperrors = 0, $nohook = 0, // If error because it does not exists, we should return true, and we should return false if this is a permission problem } } - } else dol_syslog("No files to delete found", LOG_DEBUG); + } else { + dol_syslog("No files to delete found", LOG_DEBUG); + } } else { $ok = false; if ($nophperrors) $ok = @unlink($file_osencoded);