Skip to content

Commit

Permalink
fix(files_external): Stop building path twice when checking if file e…
Browse files Browse the repository at this point in the history
…xists on case insensitive SMB storage

Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin committed Mar 10, 2025
1 parent 78b31ca commit e9e67cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_external/lib/Lib/Storage/SMB.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e9e67cb

Please sign in to comment.