From 0b91532bf6a6b50ba1e2561f40327f40e88649f7 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 15 Mar 2021 09:45:34 +0200 Subject: [PATCH] show error if anon-images directory could not be created --- admin/inc/class.admin_config.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/inc/class.admin_config.inc.php b/admin/inc/class.admin_config.inc.php index 9656225215..6db4049e5b 100644 --- a/admin/inc/class.admin_config.inc.php +++ b/admin/inc/class.admin_config.inc.php @@ -31,9 +31,9 @@ class admin_config $path = $GLOBALS['egw_info']['server']['files_dir'].'/anon-images'; $success = false; $response = Api\Json\Response::get(); - if (is_array($file) && is_writable(dirname($path))) + if (is_array($file) && is_writable(dirname($path)) && + (is_dir($path) || mkdir($path))) { - if (!is_dir($path)) mkdir ($path); $tmp_file = array_keys($file); $destination = $path.'/'.$file[$tmp_file[0]]['name']; $success = rename($GLOBALS['egw_info']['server']['temp_dir'].'/'.$tmp_file[0],$destination);