Files
Slick Daddy 4187d164b3 fix: close HTTP response bodies and add nil guards for Primary() calls (#6930)
* Fix HTTP body leaks, nil pointer panics, and file handle cleanup

* Extract unzipFile loop body into unzipFileEntry helper

The unzipFile function had defer o.Close() and defer i.Close() inside
a for loop, which is a Go antipattern — defers are function-scoped and
wouldn't execute until unzipFile returned, leaving file handles open
across iterations. Extracting the per-file logic into unzipFileEntry
ensures each defer fires when that function returns, at the end of each
loop iteration.
2026-05-25 10:09:44 +10:00
..