summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-01-28 00:16:18 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-01-28 00:16:31 -0700
commitc97c00d799bbfbab958d3b03d403c5431a1cb7e2 (patch)
tree605f41a173044267754fa21719ab473e0a8b133e
parent891877f7b1bbb1dea0f82ec6e577dc0cb3ce51e0 (diff)
downloadmailscripts-c97c00d799bbfbab958d3b03d403c5431a1cb7e2.tar.gz
gmi2email: avoid loading whole gemtext into memory
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rwxr-xr-xgmi2email2
1 files changed, 1 insertions, 1 deletions
diff --git a/gmi2email b/gmi2email
index 9fa4c23..d3e0ed5 100755
--- a/gmi2email
+++ b/gmi2email
@@ -215,7 +215,7 @@ sub gemini_fetch {
(my $dir = $path) =~ s{[^/]*$}{};
$authority =~ m{/$} or $authority .= "/";
$path =~ m{/$} or $path .= "/";
- for (<$cl>) {
+ while (local $_ = <$cl>) {
s/\r?\n\z//;
if (m{^=>\s*\./}) {
push @lines, "=> gemini://$authority$dir$'";