Skip to content

Commit 564838a

Browse files
authored
Merge pull request #61914 from nextcloud/leftybournes/fix/s3_trim_multiple_spaces_in_original_path
fix(s3): trim multiple spaces to single space in original path header
2 parents 868f9b1 + 43ed780 commit 564838a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/private/Files/ObjectStore/ObjectStoreStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ public function writeStream(string $path, $stream, ?int $size = null): int {
501501
$metadata = [
502502
'mimetype' => $mimetype,
503503
'original-storage' => $this->getId(),
504-
'original-path' => $path,
504+
'original-path' => preg_replace('/\s+/', ' ', $path) ?? $path,
505505
];
506506
if ($size) {
507507
$metadata['size'] = $size;

0 commit comments

Comments
 (0)