From: Andrew Dolgov Date: Fri, 6 Sep 2013 05:21:17 +0000 (+0400) Subject: cache starred: only try to chmod cache directory if it is not writable X-Git-Tag: 1.10~10 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f5967cf825bbcc26ac3c8ac1ba5ce86ef3be9855;p=tt-rss.git cache starred: only try to chmod cache directory if it is not writable --- diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php index 6899aa5c..f721b389 100644 --- a/plugins/cache_starred_images/init.php +++ b/plugins/cache_starred_images/init.php @@ -21,7 +21,9 @@ class Cache_Starred_Images extends Plugin { } if (is_dir($this->cache_dir)) { - chmod($this->cache_dir, 0777); + + if (!is_writable($this->cache_dir)) + chmod($this->cache_dir, 0777); if (is_writable($this->cache_dir)) { $host->add_hook($host::HOOK_UPDATE_TASK, $this);