better parent path bahaviour for the filecache

remotes/origin/stable5
Robin Appelman 13 years ago
parent 6134e554f2
commit 636c75ce06
  1. 8
      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);
}
}

Loading…
Cancel
Save