diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2017-02-15 20:21:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-15 20:21:03 +0100 |
commit | f60d95840e77c1945bfa5acc5911ca12ca70ea42 (patch) | |
tree | 1d19210b47e351d1fbf277c5151771c303cb556d /lib | |
parent | 2d8b7b875b8f9a3bf06c6808fd241da0c9498422 (diff) | |
parent | 2520a4831b2f2fefc52395355238091c9d6823b8 (diff) | |
download | nextcloud-server-f60d95840e77c1945bfa5acc5911ca12ca70ea42.tar.gz nextcloud-server-f60d95840e77c1945bfa5acc5911ca12ca70ea42.zip |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Cache/Scanner.php | 2 | ||||
-rw-r--r-- | lib/private/Files/Cache/Wrapper/CacheJail.php | 6 | ||||
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Jail.php | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/lib/private/Files/Cache/Scanner.php b/lib/private/Files/Cache/Scanner.php index 8625e4904ca..0aaedd6582f 100644 --- a/lib/private/Files/Cache/Scanner.php +++ b/lib/private/Files/Cache/Scanner.php @@ -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 diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index d8bdca6a3c4..894fbcc803d 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -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)); } /** diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php index 8615d73f346..013f5ab2344 100644 --- a/lib/private/Files/Storage/Wrapper/Jail.php +++ b/lib/private/Files/Storage/Wrapper/Jail.php @@ -58,7 +58,7 @@ class Jail extends Wrapper { } public function getId() { - return 'link:' . parent::getId() . ':' . $this->rootPath; + return parent::getId(); } /** |