Merge pull request #51387 from nextcloud/backport/51364/stable30

[stable30] fix(files_external): Stop building path twice when checking if file exists on case insensitive SMB storage
This commit is contained in:
Stephan Orbaugh 2025-03-24 14:26:11 +01:00 committed by GitHub
commit ff70d226c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -663,7 +663,7 @@ class SMB extends Common implements INotifyStorage {
// 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;