better parent path bahaviour for the filecache
This commit is contained in:
parent
6134e554f2
commit
636c75ce06
|
@ -194,10 +194,14 @@ class Cache {
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function getParentId($file) {
|
public function getParentId($file) {
|
||||||
if ($file === '/' or $file === '') {
|
if ($file === '') {
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
} else {
|
||||||
return $this->getId(dirname($file));
|
$parent = dirname($file);
|
||||||
|
if ($parent === '.') {
|
||||||
|
$parent = '';
|
||||||
|
}
|
||||||
|
return $this->getId($parent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue