diff options
| author | Ken Kochis <kkochis@outlook.com> | 2023-02-21 17:08:03 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-02-22 06:07:47 -0500 |
| commit | 436e99d13ba188412b8a431b69cc9ff29c6bec4a (patch) | |
| tree | 9efc23027a0bdaa70535e3a9fb777d946d1b3bc2 /src/Package.zig | |
| parent | b52be973dfb7d1408218b8e75800a2da3dc69108 (diff) | |
| download | zig-436e99d13ba188412b8a431b69cc9ff29c6bec4a.tar.gz zig-436e99d13ba188412b8a431b69cc9ff29c6bec4a.zip | |
Close files in hashFileFallible
Diffstat (limited to 'src/Package.zig')
| -rw-r--r-- | src/Package.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Package.zig b/src/Package.zig index 68d67a6d62..d599aefe56 100644 --- a/src/Package.zig +++ b/src/Package.zig @@ -625,6 +625,7 @@ fn workerHashFile(dir: fs.Dir, hashed_file: *HashedFile, wg: *WaitGroup) void { fn hashFileFallible(dir: fs.Dir, hashed_file: *HashedFile) HashedFile.Error!void { var buf: [8000]u8 = undefined; var file = try dir.openFile(hashed_file.path, .{}); + defer file.close(); var hasher = Manifest.Hash.init(.{}); hasher.update(hashed_file.path); hasher.update(&.{ 0, @boolToInt(try isExecutable(file)) }); |
