diff options
Diffstat (limited to 'lib/private/legacy/OC_Files.php')
-rw-r--r-- | lib/private/legacy/OC_Files.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/legacy/OC_Files.php b/lib/private/legacy/OC_Files.php index ac0a2bbd0e9..ee3be30948b 100644 --- a/lib/private/legacy/OC_Files.php +++ b/lib/private/legacy/OC_Files.php @@ -46,6 +46,7 @@ use OC\Streamer; use OCP\Lock\ILockingProvider; use OCP\Files\Events\BeforeZipCreatedEvent; use OCP\Files\Events\BeforeDirectFileDownloadEvent; +use OCP\Files\IRootFolder; use OCP\EventDispatcher\IEventDispatcher; /** @@ -187,7 +188,7 @@ class OC_Files { foreach ($files as $file) { $file = $dir . '/' . $file; if (\OC\Files\Filesystem::is_file($file)) { - $userFolder = \OC::$server->getRootFolder()->get(\OC\Files\Filesystem::getRoot()); + $userFolder = \OC::$server->get(IRootFolder::class)->get(\OC\Files\Filesystem::getRoot()); $file = $userFolder->get($file); if ($file instanceof \OC\Files\Node\File) { try { @@ -307,7 +308,7 @@ class OC_Files { $file = null; try { - $userFolder = \OC::$server->getRootFolder()->get(\OC\Files\Filesystem::getRoot()); + $userFolder = \OC::$server->get(IRootFolder::class)->get(\OC\Files\Filesystem::getRoot()); $file = $userFolder->get($filename); if (!$file instanceof \OC\Files\Node\File || !$file->isReadable()) { http_response_code(403); |