diff options
author | Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com> | 2024-03-14 21:40:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-14 21:40:34 +0100 |
commit | 0c03b3240718baeee377359b510c8f718a1e5c4d (patch) | |
tree | a07de58ed1f55fa93c074c0d8e3733a9ff2a2e82 | |
parent | a2b924edc686856614678aa9e4af90cd0f7fb6f9 (diff) | |
parent | 63e5b6fb95488aa282fa2d7a430ad60154dbb858 (diff) | |
download | nextcloud-server-0c03b3240718baeee377359b510c8f718a1e5c4d.tar.gz nextcloud-server-0c03b3240718baeee377359b510c8f718a1e5c4d.zip |
Merge pull request #44206 from nextcloud/backport/44203/stable27
-rw-r--r-- | lib/private/Files/Storage/Local.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 813e5aa09d7..661ae68d44e 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -275,7 +275,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)); |