~sircmpwn/helios-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH mercury] Don't error when reading from end of tar file

Details
Message ID
<20230428031702.4164147-1-me@tomlebreux.com>
DKIM signature
missing
Download raw message
Patch: +2 -2
Signed-off-by: Tom Lebreux <me@tomlebreux.com>
---
That seems to fix it for me. One issue was that when we were at the end of
the tar file and we attempted to read again (to get an io::EOF), it
would return an error instead of io::EOF.
 format/tar/reader.ha | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/format/tar/reader.ha b/format/tar/reader.ha
index cb67a8dbb8df..db4e6c73dd39 100644
--- a/format/tar/reader.ha
+++ b/format/tar/reader.ha
@@ -55,7 +55,7 @@ export fn next(rd: *reader) (entry | error | io::EOF) = {
			return truncated;
		};
	case io::EOF =>
		return truncated;
		return io::EOF;
	};

	if (zeroed(buf)) {
@@ -65,7 +65,7 @@ export fn next(rd: *reader) (entry | error | io::EOF) = {
				return truncated;
			};
		case io::EOF =>
			return truncated;
			return io::EOF;
		};
		if (!zeroed(buf)) {
			return truncated;
-- 
2.39.2
Reply to thread Export thread (mbox)