Signed-off-by: Julius Härtl <jus@bitgrid.net>
use OCP\Files\EntityTooLargeException;
use OCP\Files\FileInfo;
use OCP\Files\ForbiddenException;
+use OCP\Files\GenericFileException;
use OCP\Files\InvalidContentException;
use OCP\Files\InvalidPathException;
use OCP\Files\LockNotAcquiredException;
$isEOF = feof($stream);
});
- $count = $partStorage->writeStream($internalPartPath, $wrappedData);
- $result = $count > 0;
+ $result = true;
+ $count = -1;
+ try {
+ $count = $partStorage->writeStream($internalPartPath, $wrappedData);
+ } catch (GenericFileException $e) {
+ $result = false;
+ }
+
if ($result === false) {
$result = $isEOF;