aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-03-16 13:20:25 +0100
committerGitHub <noreply@github.com>2024-03-16 13:20:25 +0100
commit92e43540ba80c773dcc1e2f02a1ee0d6feea993c (patch)
tree9c5c4e7e6b10b8e6159ef4fdb2735ee5ac1d11de /lib
parent1c35f29b7d7772452aa6eef4da839921bfb8af34 (diff)
parente13e8c13491491f66eb9a4eb5c489672b5cafc44 (diff)
downloadnextcloud-server-92e43540ba80c773dcc1e2f02a1ee0d6feea993c.tar.gz
nextcloud-server-92e43540ba80c773dcc1e2f02a1ee0d6feea993c.zip
Merge pull request #44208 from nextcloud/backport/44203/stable28
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Local.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 0fca853da59..c49cf91dc91 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -282,7 +282,11 @@ class Local extends \OC\Files\Storage\Common {
public function file_exists($path) {
if ($this->caseInsensitive) {
$fullPath = $this->getSourcePath($path);
- $content = scandir(dirname($fullPath), SCANDIR_SORT_NONE);
+ $parentPath = dirname($fullPath);
+ if (!is_dir($parentPath)) {
+ return false;
+ }
+ $content = scandir($parentPath, SCANDIR_SORT_NONE);
return is_array($content) && array_search(basename($fullPath), $content) !== false;
} else {
return file_exists($this->getSourcePath($path));