Make sure we use the correct storage id when scanning a jailed storage

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2017-01-25 17:03:45 +01:00
parent ffe2543a57
commit 2520a4831b
No known key found for this signature in database
GPG Key ID: 50F2B59C6DEBBCFE
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();
}
/**