]> git.wh0rd.org Git - tt-rss.git/commitdiff
cache starred: only try to chmod cache directory if it is not writable
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 6 Sep 2013 05:21:17 +0000 (09:21 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Fri, 6 Sep 2013 05:21:17 +0000 (09:21 +0400)
plugins/cache_starred_images/init.php

index 6899aa5cf9c562bcf742b8f88581efa82bb364ec..f721b38927605612c91292959fd2c89e02180c1e 100644 (file)
@@ -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);