Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Apr 23, 2025

Backport of PR #51491

susnux added 2 commits April 23, 2025 15:19
Reduce nesting and drop duplicated sections.

Signed-off-by: Ferdinand Thiessen <[email protected]>
A filename must be less or equal 255 characters, but when adding the
`.part` and `.ocfiletransfer` extensions we might overflow this limit.
So we should also use filename hashes for uploading when the file has a
long filename, similar like when we are uploading to the user storage
directly.

Signed-off-by: Ferdinand Thiessen <[email protected]>
$this->l10n->t(
'Error while copying file to target location (copied: %1$s, expected filesize: %2$s)',
[
$this->l10n->n('%n byte', '%n bytes', $count),

Check notice

Code scanning / Psalm

PossiblyUndefinedVariable Note

Possibly undefined variable $count, first seen on line 208
);
}
if ($expected >= 0
&& $expected !== $count

Check notice

Code scanning / Psalm

PossiblyUndefinedVariable Note

Possibly undefined variable $count, first seen on line 208
'Expected filesize of %1$s but read (from Nextcloud client) and wrote (to Nextcloud storage) %2$s. Could either be a network problem on the sending side or a problem writing to the storage on the server side.',
[
$this->l10n->n('%n byte', '%n bytes', $expected),
$this->l10n->n('%n byte', '%n bytes', $count),

Check notice

Code scanning / Psalm

PossiblyUndefinedVariable Note

Possibly undefined variable $count, first seen on line 208
@susnux susnux merged commit 6b0fe83 into stable30 Apr 23, 2025
176 checks passed
@susnux susnux deleted the backport/51491/stable30 branch April 23, 2025 17:56
@blizzz blizzz mentioned this pull request May 5, 2025
10 tasks
@nextcloud-bot nextcloud-bot mentioned this pull request Sep 25, 2025
2 tasks
@blizzz blizzz mentioned this pull request Oct 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants