diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-10-03 11:23:33 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-10-03 11:23:33 +0200 |
commit | 636c75ce061492751d0fb001e0bf7219df379f09 (patch) | |
tree | 061ec077f3dba77d61e0b9920cf44dd3c82fc9ea /lib/files/cache | |
parent | 6134e554f2306c5309a793d4d3149a0f9b05ea5f (diff) | |
download | nextcloud-server-636c75ce061492751d0fb001e0bf7219df379f09.tar.gz nextcloud-server-636c75ce061492751d0fb001e0bf7219df379f09.zip |
better parent path bahaviour for the filecache
Diffstat (limited to 'lib/files/cache')
-rw-r--r-- | lib/files/cache/cache.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/files/cache/cache.php b/lib/files/cache/cache.php index 9d8275e5e03..79673771e5e 100644 --- a/lib/files/cache/cache.php +++ b/lib/files/cache/cache.php @@ -194,10 +194,14 @@ class Cache { * @return int */ public function getParentId($file) { - if ($file === '/' or $file === '') { + if ($file === '') { return -1; } else { - return $this->getId(dirname($file)); + $parent = dirname($file); + if ($parent === '.') { + $parent = ''; + } + return $this->getId($parent); } } |