diff options
author | Andrew Dolgov <[email protected]> | 2013-09-06 09:21:17 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-09-06 09:21:17 +0400 |
commit | f5967cf825bbcc26ac3c8ac1ba5ce86ef3be9855 (patch) | |
tree | 88edd0696f242193d532ac3df2ceba6ebbc50614 | |
parent | 0c0e5f3640ff6e857a978f9bdd4af35fb4716f5e (diff) |
cache starred: only try to chmod cache directory if it is not writable
-rw-r--r-- | plugins/cache_starred_images/init.php | 4 |
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); |