Merge pull request #53208 from nextcloud/backport/53145/stable30

[stable30] fix: log error when writing stream to dav file
pull/53230/head
Andy Scherzinger 2025-05-31 17:46:14 +07:00 committed by GitHub
commit 8a7ffb0984
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

@ -209,7 +209,9 @@ class File extends Node implements IFile {
try {
/** @var IWriteStreamStorage $partStorage */
$count = $partStorage->writeStream($internalPartPath, $wrappedData);
} catch (GenericFileException) {
} catch (GenericFileException $e) {
$logger = \OCP\Server::get(LoggerInterface::class);
$logger->error('Error while writing stream to storage: ' . $e->getMessage(), ['exception' => $e, 'app' => 'webdav']);
$result = $isEOF;
if (is_resource($wrappedData)) {
$result = feof($wrappedData);