Removed useless chmod() (#907)

This commit is contained in:
Roman Kelesidis 2023-09-19 17:05:27 +07:00 committed by GitHub
commit 715faa2dd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View file

@ -347,10 +347,9 @@ if ($check_image_cat) {
// Does the target directory exist, is it a directory and writeable
if (!@file_exists(amod_realpath($upload_dir))) {
if (!bb_mkdir($upload_dir, 0755) && !is_dir($upload_dir)) {
if (!bb_mkdir($upload_dir) && !is_dir($upload_dir)) {
throw new \RuntimeException(sprintf('Directory "%s" was not created', $upload_dir));
}
@chmod($upload_dir, 0777);
if (!@file_exists(amod_realpath($upload_dir))) {
$error = true;

View file

@ -42,8 +42,7 @@ if ((int)$attach_config['img_create_thumbnail']) {
$thumb_dir = "$attach_dir/" . THUMB_DIR;
if (!is_dir($thumb_dir)) {
bb_mkdir($thumb_dir, 0755);
@chmod($thumb_dir, 0777);
bb_mkdir($thumb_dir);
}
}