diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/view.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index b07225cca56..1ad59fd9123 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -898,7 +898,8 @@ class View { if ($this->fakeRoot === $defaultRoot) { return true; } - return (strlen($this->fakeRoot) > strlen($defaultRoot)) && (substr($this->fakeRoot, 0, strlen($defaultRoot) + 1) === $defaultRoot . '/'); + $fullPath = $this->getAbsolutePath($path); + return (strlen($fullPath) > strlen($defaultRoot)) && (substr($fullPath, 0, strlen($defaultRoot) + 1) === $defaultRoot . '/'); } /** @@ -908,10 +909,11 @@ class View { * @return bool */ private function runHooks($hooks, $path, $post = false) { + $relativePath = $path; $path = $this->getHookPath($path); $prefix = ($post) ? 'post_' : ''; $run = true; - if ($this->shouldEmitHooks($path)) { + if ($this->shouldEmitHooks($relativePath)) { foreach ($hooks as $hook) { if ($hook != 'read') { \OC_Hook::emit( |