mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #44206 from nextcloud/backport/44203/stable27
This commit is contained in:
commit
0c03b32407
1 changed files with 5 additions and 1 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue