Fix for when adding our address to path for outgoing echomails - introduced in 5fc6906
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 41s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m46s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
2024-05-23 17:36:47 +10:00
parent 710adad634
commit 4f8448563d
4 changed files with 11 additions and 5 deletions

View File

@@ -16,6 +16,7 @@ final class Mail extends Send
/** @var int Our internal position counter */
private int $readpos;
private ?string $content;
/**
* @throws \Exception
@@ -84,6 +85,8 @@ final class Mail extends Send
'sent_at'=>Carbon::now(),
'sent_pkt'=>$this->name,
]);
$this->content = NULL;
}
}
@@ -94,12 +97,13 @@ final class Mail extends Send
public function open(string $compress=''): bool
{
$this->content = (string)$this->f;
return TRUE;
}
public function read(int $length): string
{
$result = substr((string)$this->f,$this->readpos,$length);
$result = substr($this->content,$this->readpos,$length);
$this->readpos += strlen($result);
return $result;
@@ -108,7 +112,7 @@ final class Mail extends Send
public function seek(int $pos): bool
{
$this->readpos = ($pos < $this->size) ? $pos : $this->size;
return TRUE;
return TRUE;
}
private function youngest(): Carbon