mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
Removed useless chmod() (#907)
This commit is contained in:
parent
34fd7ba2f8
commit
715faa2dd2
2 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue