Improvements to caching for shared folders
This commit is contained in:
parent
a402c8ffe1
commit
053edde780
|
@ -43,15 +43,24 @@ class OC_FILESTORAGE_SHARED {
|
|||
}
|
||||
|
||||
public function getSource($target) {
|
||||
print_r($this->sourcePaths);
|
||||
if (array_key_exists($target, $this->sourcePaths)) {
|
||||
if ($target == "") {
|
||||
return false;
|
||||
} elseif (array_key_exists($target, $this->sourcePaths)) {
|
||||
return $this->sourcePaths[$target];
|
||||
} else {
|
||||
$parentDir = dirname($target);
|
||||
if ($parentDir != ".") {
|
||||
$source = $this->getSource($parentDir);
|
||||
return $source."/".basename($target);
|
||||
} else {
|
||||
$source = OC_SHARE::getSource($target);
|
||||
if ($source) {
|
||||
$this->sourcePaths[$target] = $source;
|
||||
}
|
||||
return $source;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO OC_SHARE::getPermissions()
|
||||
public function mkdir($path) {
|
||||
|
|
Loading…
Reference in New Issue