]> source.dussan.org Git - nextcloud-server.git/commitdiff
More secure proposal
authorPierre Jochem <pierrejochem@msn.com>
Wed, 1 Apr 2015 09:28:53 +0000 (11:28 +0200)
committerPierre Jochem <pierrejochem@msn.com>
Wed, 1 Apr 2015 09:28:53 +0000 (11:28 +0200)
lib/private/cache/fileglobalgc.php

index 57068736104cb68877af23eedd44b194f05ac602..0d966282383128d3d19a4df22e1a82d032b93394 100644 (file)
@@ -72,7 +72,9 @@ class FileGlobalGC extends Job {
                }
                $paths = $this->getExpiredPaths($cacheDir, $now);
                array_walk($paths, function($file) {
-                       unlink($file);
+                       if (file_exists($file)) {
+                               unlink($file);
+                       }
                });
        }
 }