| ... | @@ -349,14 +349,14 @@ pub const CacheHash = struct { | ... | @@ -349,14 +349,14 @@ pub const CacheHash = struct { |
| 349 | /// Writing to the manifest file is the only way that this file can return an | 349 | /// Writing to the manifest file is the only way that this file can return an |
| 350 | /// error. | 350 | /// error. |
| 351 | pub fn release(self: *@This()) !void { | 351 | pub fn release(self: *@This()) !void { |
| 352 | debug.assert(self.manifest_file != null); | 352 | if (self.manifest_file) |file| { |
| | 353 | if (self.manifest_dirty) { |
| | 354 | try self.write_manifest(); |
| | 355 | } |
| 353 | | 356 | |
| 354 | if (self.manifest_dirty) { | 357 | file.close(); |
| 355 | try self.write_manifest(); | | |
| 356 | } | 358 | } |
| 357 | | 359 | |
| 358 | self.manifest_file.?.close(); | | |
| 359 | | | |
| 360 | for (self.files.items) |*file| { | 360 | for (self.files.items) |*file| { |
| 361 | file.deinit(self.alloc); | 361 | file.deinit(self.alloc); |
| 362 | } | 362 | } |