Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Feb 28, 2025

Backport of PR #50881

If the stream is aborted and the callback wrapper returns false (or
null as it happened in some cases), we should not try to write to the
storage but abort the operation.

Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux force-pushed the backport/50881/stable30 branch from 93995c3 to 01663e6 Compare March 3, 2025 09:09
$count = -1;
try {
/** @var IWriteStreamStorage $partStorage */
$count = $partStorage->writeStream($internalPartPath, $wrappedData);

Check notice

Code scanning / Psalm

PossiblyFalseArgument Note

Argument 2 of OCP\Files\Storage\IWriteStreamStorage::writeStream cannot be false, possibly resource value expected
@susnux susnux merged commit 841cad5 into stable30 Mar 3, 2025
176 checks passed
@susnux susnux deleted the backport/50881/stable30 branch March 3, 2025 13:16
@blizzz blizzz mentioned this pull request Mar 4, 2025
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants