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:
Roeland Jago Douma 2017-02-15 20:21:03 +01:00 committed by GitHub
commit f60d95840e
3 changed files with 3 additions and 7 deletions

View File

@ -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

View File

@ -142,11 +142,7 @@ class CacheJail extends CacheWrapper {
* @return int
*/
public function getParentId($file) {
if ($file === '') {
return -1;
} else {
return $this->getCache()->getParentId($this->getSourcePath($file));
}
return $this->getCache()->getParentId($this->getSourcePath($file));
}
/**

View File

@ -58,7 +58,7 @@ class Jail extends Wrapper {
}
public function getId() {
return 'link:' . parent::getId() . ':' . $this->rootPath;
return parent::getId();
}
/**