Merge pull request #43349 from nextcloud/fix/case-sensitive-root-smb

SMB: allow to list root directory when using case-insensitive option
pull/43464/head
Arthur Schiwon 2024-02-12 11:14:07 +07:00 committed by GitHub
commit 35d0c63abc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

@ -683,7 +683,8 @@ class SMB extends Common implements INotifyStorage {
public function file_exists($path) {
try {
if ($this->caseSensitive === false) {
// Case sensitive filesystem doesn't matter for root directory
if ($this->caseSensitive === false && $path !== '') {
$filename = basename($path);
$siblings = $this->getDirectoryContent(dirname($this->buildPath($path)));
foreach ($siblings as $sibling) {