summaryrefslogtreecommitdiff
path: root/archive/tar.ts
diff options
context:
space:
mode:
Diffstat (limited to 'archive/tar.ts')
-rw-r--r--archive/tar.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/archive/tar.ts b/archive/tar.ts
index 5f5b1a99e..05b666b24 100644
--- a/archive/tar.ts
+++ b/archive/tar.ts
@@ -40,12 +40,12 @@ export class FileReader implements Deno.Reader {
constructor(private filePath: string, private mode: Deno.OpenMode = "r") {}
- public async read(p: Uint8Array): Promise<Deno.ReadResult> {
+ public async read(p: Uint8Array): Promise<number | Deno.EOF> {
if (!this.file) {
this.file = await Deno.open(this.filePath, this.mode);
}
const res = await Deno.read(this.file.rid, p);
- if (res.eof) {
+ if (res === Deno.EOF) {
await Deno.close(this.file.rid);
this.file = undefined;
}