mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Fixed checking exists a file to create a cache
https: //github.com/torrentpier/torrentpier/pull/481 Co-Authored-By: Vasily Komrakov <425040+diolektor@users.noreply.github.com>
This commit is contained in:
parent
6a4ee4e238
commit
2bc28aa29f
1 changed files with 1 additions and 1 deletions
|
@ -253,7 +253,7 @@ function file_write($str, $file, $max_size = LOG_MAX_SIZE, $lock = true, $replac
|
||||||
rename($file, $new_name);
|
rename($file, $new_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (file_exists($file) && $dir_created = bb_mkdir(dirname($file))) {
|
if (!file_exists($file) && $dir_created = bb_mkdir(dirname($file))) {
|
||||||
$fp = fopen($file, 'ab+');
|
$fp = fopen($file, 'ab+');
|
||||||
}
|
}
|
||||||
if (isset($fp)) {
|
if (isset($fp)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue