|
42 | 42 | use Icewind\SMB\Exception\ForbiddenException; |
43 | 43 | use Icewind\SMB\Exception\InvalidArgumentException; |
44 | 44 | use Icewind\SMB\Exception\NotFoundException; |
| 45 | +use Icewind\SMB\Exception\OutOfSpaceException; |
45 | 46 | use Icewind\SMB\Exception\TimedOutException; |
46 | 47 | use Icewind\SMB\IFileInfo; |
47 | 48 | use Icewind\SMB\Native\NativeServer; |
@@ -460,6 +461,8 @@ public function fopen($path, $mode) { |
460 | 461 | return false; |
461 | 462 | } catch (ForbiddenException $e) { |
462 | 463 | return false; |
| 464 | + } catch (OutOfSpaceException $e) { |
| 465 | + throw new EntityTooLargeException("not enough available space to create file", 0, $e); |
463 | 466 | } catch (ConnectException $e) { |
464 | 467 | $this->logger->logException($e, ['message' => 'Error while opening file']); |
465 | 468 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
@@ -501,6 +504,8 @@ public function touch($path, $time = null) { |
501 | 504 | return true; |
502 | 505 | } |
503 | 506 | return false; |
| 507 | + } catch (OutOfSpaceException $e) { |
| 508 | + throw new EntityTooLargeException("not enough available space to create file", 0, $e); |
504 | 509 | } catch (ConnectException $e) { |
505 | 510 | $this->logger->logException($e, ['message' => 'Error while creating file']); |
506 | 511 | throw new StorageNotAvailableException($e->getMessage(), $e->getCode(), $e); |
|
0 commit comments