From d62f87ee4ce118367902ff9b5cd577f469bdba1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Canek=20Pel=C3=A1ez=20Vald=C3=A9s?= Date: Wed, 8 Jan 2025 17:03:49 -0600 Subject: [PATCH] Create parent directories. --- class.processor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/class.processor.php b/class.processor.php index bf108f3..aecaeef 100644 --- a/class.processor.php +++ b/class.processor.php @@ -27,7 +27,8 @@ class Processor { } public function process() { - if (!is_dir(dirname($this->target)) && !mkdir(dirname($this->target))) + if (!is_dir(dirname($this->target)) && + !mkdir(dirname($this->target), 0777, true)) return false; if (!move_uploaded_file($this->source, $this->target)) return false; -- GitLab