Browse Source

Exit early if $storage is falsy in View::getDirectoryContent

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/31754/head
Côme Chilliet 4 years ago
committed by Côme Chilliet (Rebase PR Action)
parent
commit
d36a1a7bf6
  1. 12
      lib/private/Files/View.php

12
lib/private/Files/View.php

@ -1436,15 +1436,16 @@ class View {
if (!Filesystem::isValidPath($directory)) {
return [];
}
$path = $this->getAbsolutePath($directory);
$path = Filesystem::normalizePath($path);
$mount = $this->getMount($directory);
if (!$mount) {
return [];
}
$storage = $mount->getStorage();
$internalPath = $mount->getInternalPath($path);
if ($storage) {
if (!$storage) {
return [];
}
$cache = $storage->getCache($internalPath);
$user = \OC_User::getUser();
@ -1551,9 +1552,6 @@ class View {
}
return array_values($files);
} else {
return [];
}
}
/**

Loading…
Cancel
Save