authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-04-02 15:29:16-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-04-02 15:29:16-04:00
log2f96c55095514de35a25ec2cf84a79e6c5e3a646
tree705ed5cf6409958a6f78c4a4e33e2d54fe90233a
parent0cccba71d41afee519d0000eb719f8c95f288166

fix cache hash regression

fixes "warning: unexpected seek failure" fix regression introduced by 27e31f04758d95cb7cf51a74e2a3903553ce3bc5 the fd should be closed only if returning with an error

1 files changed, 3 insertions(+), 1 deletions(-)

src/cache_hash.cpp+3-1
......@@ -437,7 +437,9 @@ Error cache_hit(CacheHash *ch, Buf *out_digest) {
437437 return ErrorCacheUnavailable;
438438 }
439439 }
440 os_file_close(ch->manifest_file);
440 if (return_code != ErrorNone) {
441 os_file_close(ch->manifest_file);
442 }
441443 return return_code;
442444 }
443445 // Cache Hit