fix: log error when writing stream to dav file

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/53145/head
Robin Appelman 2025-05-27 18:56:26 +07:00 committed by Andy Scherzinger
parent 14cc8d3e13
commit b9b8db6176
1 changed files with 3 additions and 1 deletions

@ -216,7 +216,9 @@ class File extends Node implements IFile {
try {
/** @var IWriteStreamStorage $partStorage */
$count = $partStorage->writeStream($internalPartPath, $wrappedData);
} catch (GenericFileException) {
} catch (GenericFileException $e) {
$logger = 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);