diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index a83887fcda6d..34d7585f6e92 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -676,7 +676,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) {