fix directory permissions

This commit is contained in:
m1k1o 2020-06-25 17:57:37 +02:00
parent 1ce28f77ad
commit 031cfb7b14

View file

@ -137,7 +137,10 @@ class Image
// Ensure, that directories exists
$_images_path = Config::get('images_path');
$_thumbnails_path = Config::get('thumbnails_path');
if((!is_dir($_images_path) && !mkdir($_images_path, 755, true)) || (!is_dir($_thumbnails_path) && !mkdir($_thumbnails_path, 755, true))){
if(
(!is_dir($_images_path) && !mkdir($_images_path, 0755, true)) ||
(!is_dir($_thumbnails_path) && !mkdir($_thumbnails_path, 0755, true))
){
throw new Exception("Images or thumbnails directory could not be created.");
}