]> source.dussan.org Git - nextcloud-server.git/commitdiff
extract the right parent directory from the path v4.5.0
authorBjörn Schießle <schiessle@owncloud.com>
Tue, 9 Oct 2012 14:21:46 +0000 (16:21 +0200)
committerBjörn Schießle <schiessle@owncloud.com>
Tue, 9 Oct 2012 14:24:49 +0000 (16:24 +0200)
add parent directory to the file cache if it does not exist yet.

lib/filecache.php

index d68525d9a544e2c892b6454166f5af23d8c53a33..8fcb6fd9404db825bd38f83aa2945b7c6262aa0d 100644 (file)
@@ -79,7 +79,7 @@ class OC_FileCache{
 
                // add parent directory to the file cache if it does not exist yet.
                if ($parent == -1 && $fullpath != $root) {
-                       $parentDir = substr(dirname($path), 0, strrpos(dirname($path), DIRECTORY_SEPARATOR));
+                       $parentDir = dirname($path);
                        self::scanFile($parentDir);
                        $parent = self::getParentId($fullpath);
                }