diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index d4af8e1fded..1be900fa9de 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -2325,7 +2325,7 @@ function dol_compress_file($inputfile, $outputfile, $mode = "gz", &$errorstring */ function dol_uncompress($inputfile, $outputdir) { - global $conf, $langs, $db; + global $langs, $db; $fileinfo = pathinfo($inputfile); $fileinfo["extension"] = strtolower($fileinfo["extension"]); @@ -2355,6 +2355,12 @@ function dol_uncompress($inputfile, $outputdir) $errmsg = $langs->trans("ErrorFailToCreateDir", $val['filename']); break; } + if ($val['status'] == 'write_protected') { + $langs->load("errors"); + $ok = 0; + $errmsg = $langs->trans("ErrorFailToCreateFile", $val['filename']); + break; + } } if ($ok) { diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 9e276b49356..81216ec152a 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -1667,6 +1667,7 @@ class Website extends CommonObject // Export on target sources $resultarray = dol_uncompress($pathtotmpzip, $destdir); + if (!empty($resultarray)) { setEventMessages("Error, failed to unzip the export into target dir", null, 'errors'); } else {