mirror of
https://code.blicky.net/yorhel/ncdu.git
synced 2026-01-12 17:08:39 -09:00
Fix fd leak with --exclude-caches checking
This commit is contained in:
parent
f4f4af4ee5
commit
0215f3569d
1 changed files with 1 additions and 0 deletions
|
|
@ -515,6 +515,7 @@ fn scanDir(ctx: *Context, pat: *const exclude.Patterns, dir: std.fs.Dir, dir_dev
|
|||
|
||||
if (main.config.exclude_caches and ctx.stat.dir) {
|
||||
if (edir.?.openFileZ("CACHEDIR.TAG", .{})) |f| {
|
||||
defer f.close();
|
||||
const sig = "Signature: 8a477f597d28d172789f06886806bc55";
|
||||
var buf: [sig.len]u8 = undefined;
|
||||
if (f.reader().readAll(&buf)) |len| {
|
||||
|
|
|
|||
Loading…
Reference in a new issue