cache starred: only try to chmod cache directory if it is not writable

This commit is contained in:
Andrew Dolgov 2013-09-06 09:21:17 +04:00
parent 0c0e5f3640
commit f5967cf825
1 changed files with 3 additions and 1 deletions

View File

@ -21,6 +21,8 @@ class Cache_Starred_Images extends Plugin {
} }
if (is_dir($this->cache_dir)) { if (is_dir($this->cache_dir)) {
if (!is_writable($this->cache_dir))
chmod($this->cache_dir, 0777); chmod($this->cache_dir, 0777);
if (is_writable($this->cache_dir)) { if (is_writable($this->cache_dir)) {