Merge pull request #3262 from nextcloud/jail-scanner-storage-id
Make sure we use the correct storage id and parent id when scanning a jailed storage
This commit is contained in:
commit
f60d95840e
|
@ -168,7 +168,7 @@ class Scanner extends BasicEmitter implements IScanner {
|
|||
$parent = '';
|
||||
}
|
||||
if ($parentId === -1) {
|
||||
$parentId = $this->cache->getId($parent);
|
||||
$parentId = $this->cache->getParentId($file);
|
||||
}
|
||||
|
||||
// scan the parent if it's not in the cache (id -1) and the current file is not the root folder
|
||||
|
|
|
@ -142,12 +142,8 @@ class CacheJail extends CacheWrapper {
|
|||
* @return int
|
||||
*/
|
||||
public function getParentId($file) {
|
||||
if ($file === '') {
|
||||
return -1;
|
||||
} else {
|
||||
return $this->getCache()->getParentId($this->getSourcePath($file));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* check if a file is available in the cache
|
||||
|
|
|
@ -58,7 +58,7 @@ class Jail extends Wrapper {
|
|||
}
|
||||
|
||||
public function getId() {
|
||||
return 'link:' . parent::getId() . ':' . $this->rootPath;
|
||||
return parent::getId();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue