summaryrefslogtreecommitdiffstats
path: root/php-pear-1.10-restcache.patch
blob: 5979bcabcdaa8b8fc9741be925f6194bf0eeb6db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

Workaround for:

 https://bugzilla.redhat.com/show_bug.cgi?id=747361

--- REST.php.restcache
+++ REST.php
@@ -235,6 +235,13 @@
             }
         }
 
+        if (!is_writeable($cache_dir)) {
+            // If writing to the cache dir is not going to work, silently do nothing.
+            // An ugly hack, but retains compat with PEAR 1.9.1 where many commands
+            // work fine as non-root user (w/out write access to default cache dir).
+            return true;
+        }
+
         if ($cacheid === null && $nochange) {
             $cacheid = unserialize(implode('', file($cacheidfile)));
         }