%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/nextcloud.varak.net/3rdparty/.patches/
Upload File :
Create Path :
Current File : /www/varak.net/nextcloud.varak.net/3rdparty/.patches/fix-cache-for-node.diff

diff --git a/lib/DAV/Tree.php b/lib/DAV/Tree.php
index 65b4583ceb..1483e1bc51 100644
--- a/lib/DAV/Tree.php
+++ b/lib/DAV/Tree.php
@@ -62,9 +62,21 @@ public function getNodeForPath($path)
             return $this->rootNode;
         }
 
-        $parts = explode('/', $path);
         $node = $this->rootNode;
 
+        // look for any cached parent and collect the parts below the parent
+        $parts = [];
+        $remainingPath = $path;
+        do {
+            list($remainingPath, $baseName) = Uri\split($remainingPath);
+            array_unshift($parts, $baseName);
+
+            if (isset($this->cache[$remainingPath])) {
+                $node = $this->cache[$remainingPath];
+                break;
+            }
+        } while ('' !== $remainingPath);
+
         while (count($parts)) {
             if (!($node instanceof ICollection)) {
                 throw new Exception\NotFound('Could not find node at path: '.$path);

Zerion Mini Shell 1.0