Skip to content

Commit

Permalink
fixup??? Add reftable library
Browse files Browse the repository at this point in the history
Close files before trying to unlink them. This is actually required on
Windows.

Note: this is probably not the only part of the code that requires this
type of fix, but it seems to be enough to let the _current_ version of
t0031 pass.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information
dscho authored and Git for Windows Build Agent committed May 11, 2020
1 parent 3759e27 commit 5899479
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions reftable/stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,10 @@ static int stack_compact_range(struct reftable_stack *st, int first, int last,
}
}

if (lock_file_fd > 0) {
close(lock_file_fd);
lock_file_fd = 0;
}
err = unlink(slice_as_string(&lock_file_name));
if (err < 0) {
goto exit;
Expand Down

0 comments on commit 5899479

Please sign in to comment.