summaryrefslogtreecommitdiff
path: root/archive/tar.ts
diff options
context:
space:
mode:
authorYoshiya Hinosawa <stibium121@gmail.com>2019-07-08 04:20:41 +0900
committerRyan Dahl <ry@tinyclouds.org>2019-07-07 15:20:41 -0400
commit9a01d6455ec3cfa955967102f576cb542999321a (patch)
tree82a4ab5776a09432f23b9ed99a31306c884c833e /archive/tar.ts
parent6a0858bd5d9d327ac7f46bee5f5b2fab642f2a3f (diff)
Upgrade to v0.11.0 (update Reader interface) (denoland/deno_std#527)
Original: https://github.com/denoland/deno_std/commit/3ea90d54f6dad4bcc3d32e63601096a6c0ff3ce4
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;
}