From 2655a793f58874c13a175701f8ae9f9edc5d25d2 Mon Sep 17 00:00:00 2001 From: stasbilay02 Date: Fri, 24 Jan 2025 16:47:37 +0300 Subject: [PATCH] some fix --- kernel/services/AdminThemeService.php | 5 +++++ kernel/services/ModuleService.php | 5 +++++ kernel/services/ThemeService.php | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/kernel/services/AdminThemeService.php b/kernel/services/AdminThemeService.php index e01ef1c..1744677 100644 --- a/kernel/services/AdminThemeService.php +++ b/kernel/services/AdminThemeService.php @@ -105,6 +105,11 @@ class AdminThemeService if ($adminThemePaths) { $path = json_decode($adminThemePaths->value); foreach ($path->paths as $p) { + if (!is_dir(getConst($p))){ + $old_mask = umask(0); + mkdir(getConst($p), permissions: 0775, recursive: true); + umask($old_mask); + } $dirs[] = getConst($p); } } diff --git a/kernel/services/ModuleService.php b/kernel/services/ModuleService.php index 8c10564..42464c3 100644 --- a/kernel/services/ModuleService.php +++ b/kernel/services/ModuleService.php @@ -185,6 +185,11 @@ class ModuleService if ($module_paths) { $path = json_decode($module_paths->value); foreach ($path->paths as $p) { + if (!is_dir(getConst($p))){ + $old_mask = umask(0); + mkdir(getConst($p), permissions: 0775, recursive: true); + umask($old_mask); + } $dirs[] = getConst($p); } } diff --git a/kernel/services/ThemeService.php b/kernel/services/ThemeService.php index 39eea53..c883cd2 100644 --- a/kernel/services/ThemeService.php +++ b/kernel/services/ThemeService.php @@ -162,6 +162,11 @@ class ThemeService if ($ThemePaths) { $path = json_decode($ThemePaths->value); foreach ($path->paths as $p) { + if (!is_dir(getConst($p))){ + $old_mask = umask(0); + mkdir(getConst($p), permissions: 0775, recursive: true); + umask($old_mask); + } $dirs[] = getConst($p); } }