cache_media: only touch() local file if it's writable

This commit is contained in:
Andrew Dolgov 2018-09-10 16:17:12 +03:00
parent 4bb651a656
commit 665495b94b
1 changed files with 2 additions and 2 deletions

View File

@ -1218,7 +1218,7 @@ class RSSUtils {
if ($file_content && strlen($file_content) > MIN_CACHE_FILE_SIZE) {
file_put_contents($local_filename, $file_content);
}
} else {
} else if (is_writable($local_filename)) {
touch($local_filename);
}
}
@ -1254,7 +1254,7 @@ class RSSUtils {
if ($file_content && strlen($file_content) > MIN_CACHE_FILE_SIZE) {
file_put_contents($local_filename, $file_content);
}
} else {
} else if (is_writable($local_filename)) {
touch($local_filename);
}
}