|
44 | 44 | use Icewind\SMB\Exception\ForbiddenException; |
45 | 45 | use Icewind\SMB\Exception\InvalidArgumentException; |
46 | 46 | use Icewind\SMB\Exception\NotFoundException; |
| 47 | +use Icewind\SMB\Exception\OutOfSpaceException; |
47 | 48 | use Icewind\SMB\Exception\TimedOutException; |
48 | 49 | use Icewind\SMB\IFileInfo; |
49 | 50 | use Icewind\SMB\Native\NativeServer; |
|
57 | 58 | use OC\Files\Storage\Common; |
58 | 59 | use OCA\Files_External\Lib\Notify\SMBNotifyHandler; |
59 | 60 | use OCP\Constants; |
| 61 | +use OCP\Files\EntityTooLargeException; |
60 | 62 | use OCP\Files\Notify\IChange; |
61 | 63 | use OCP\Files\Notify\IRenameChange; |
62 | 64 | use OCP\Files\Storage\INotifyStorage; |
@@ -497,6 +499,8 @@ public function fopen($path, $mode) { |
497 | 499 | return false; |
498 | 500 | } catch (ForbiddenException $e) { |
499 | 501 | return false; |
| 502 | + } catch (OutOfSpaceException $e) { |
| 503 | + throw new EntityTooLargeException("not enough available space to create file", 0, $e); |
500 | 504 | } catch (ConnectException $e) { |
501 | 505 | $this->logger->logException($e, ['message' => 'Error while opening file']); |
502 | 506 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
@@ -538,6 +542,8 @@ public function touch($path, $time = null) { |
538 | 542 | return true; |
539 | 543 | } |
540 | 544 | return false; |
| 545 | + } catch (OutOfSpaceException $e) { |
| 546 | + throw new EntityTooLargeException("not enough available space to create file", 0, $e); |
541 | 547 | } catch (ConnectException $e) { |
542 | 548 | $this->logger->logException($e, ['message' => 'Error while creating file']); |
543 | 549 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
0 commit comments