diff --git a/src/scan.zig b/src/scan.zig index 03dfdf6..fdb0e3a 100644 --- a/src/scan.zig +++ b/src/scan.zig @@ -145,9 +145,9 @@ pub fn statAt(parent: std.Io.Dir, name: [:0]const u8, follow: bool, symlink: ?*b fn isCacheDir(dir: std.Io.Dir) bool { const sig = "Signature: 8a477f597d28d172789f06886806bc55"; const f = dir.openFile(main.io, "CACHEDIR.TAG", .{}) catch return false; - defer f.close(); + defer f.close(main.io); var buf: [sig.len]u8 = undefined; - const len = f.readAll(&buf) catch return false; + const len = f.readPositionalAll(main.io, &buf, 0) catch return false; return len == sig.len and std.mem.eql(u8, &buf, sig); }