From: Andrew Dolgov Date: Mon, 10 Sep 2018 13:17:12 +0000 (+0300) Subject: cache_media: only touch() local file if it's writable X-Git-Tag: 18.12~73 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=665495b94b20c6990fb86f7819794e024a1c9ed7;p=tt-rss.git cache_media: only touch() local file if it's writable --- diff --git a/classes/rssutils.php b/classes/rssutils.php index bffc41c6..094b2940 100755 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -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); } }