fix(files_external): list root when using SMB case-insensitive option

Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
This commit is contained in:
Benjamin Gaussorgues 2024-02-05 11:24:12 +01:00 committed by backportbot[bot]
parent 6c6af170c5
commit 1afaac7031

View file

@ -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) {