fix cache hash regression
fixes "warning: unexpected seek failure"
fix regression introduced by 27e31f0475
the fd should be closed only if returning with an error
This commit is contained in:
@@ -437,7 +437,9 @@ Error cache_hit(CacheHash *ch, Buf *out_digest) {
|
||||
return ErrorCacheUnavailable;
|
||||
}
|
||||
}
|
||||
os_file_close(ch->manifest_file);
|
||||
if (return_code != ErrorNone) {
|
||||
os_file_close(ch->manifest_file);
|
||||
}
|
||||
return return_code;
|
||||
}
|
||||
// Cache Hit
|
||||
|
||||
Reference in New Issue
Block a user