From f5967cf825bbcc26ac3c8ac1ba5ce86ef3be9855 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 6 Sep 2013 09:21:17 +0400 Subject: [PATCH] cache starred: only try to chmod cache directory if it is not writable --- plugins/cache_starred_images/init.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.39.2