summaryrefslogtreecommitdiff
path: root/plugins/cache_starred_images
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2013-09-06 09:21:17 +0400
committerAndrew Dolgov <[email protected]>2013-09-06 09:21:17 +0400
commitf5967cf825bbcc26ac3c8ac1ba5ce86ef3be9855 (patch)
tree88edd0696f242193d532ac3df2ceba6ebbc50614 /plugins/cache_starred_images
parent0c0e5f3640ff6e857a978f9bdd4af35fb4716f5e (diff)
cache starred: only try to chmod cache directory if it is not writable
Diffstat (limited to 'plugins/cache_starred_images')
-rw-r--r--plugins/cache_starred_images/init.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/cache_starred_images/init.php b/plugins/cache_starred_images/init.php
index 6899aa5cf..f721b3892 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);