From e9e67cbc50d0b1efb02a734b4c858b32ef8832c0 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Mon, 10 Mar 2025 09:52:32 +0100 Subject: [PATCH] fix(files_external): Stop building path twice when checking if file exists on case insensitive SMB storage Signed-off-by: provokateurin --- apps/files_external/lib/Lib/Storage/SMB.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index f08401f73c54d..fc1f9b9ecd14d 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -627,7 +627,7 @@ public function file_exists(string $path): bool { // Case sensitive filesystem doesn't matter for root directory if ($this->caseSensitive === false && $path !== '') { $filename = basename($path); - $siblings = $this->getDirectoryContent(dirname($this->buildPath($path))); + $siblings = $this->getDirectoryContent(dirname($path)); foreach ($siblings as $sibling) { if ($sibling['name'] === $filename) { return true;