From 1afaac7031543a61c1beb31cae1050a44b09c63b Mon Sep 17 00:00:00 2001 From: Benjamin Gaussorgues Date: Mon, 5 Feb 2024 11:24:12 +0100 Subject: [PATCH] fix(files_external): list root when using SMB case-insensitive option Signed-off-by: Benjamin Gaussorgues --- apps/files_external/lib/Lib/Storage/SMB.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index 2c0a412d341e8..c7324db01e4ed 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -683,7 +683,8 @@ public function mkdir($path) { 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) {