Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

Commit 803c540

Browse files
committed
Don't fail when removing index which doesn't exist
1 parent 26bf338 commit 803c540

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

indexinfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ generate_index(fd)
182182
int ffd;
183183

184184
if (sectionlen == 0) {
185-
if (unlinkat(fd, "dir", 0) == -1)
185+
if (unlinkat(fd, "dir", 0) == -1 && errno != ENOENT)
186186
err(EXIT_FAILURE, "Impossible to remove empty index file");
187187
return;
188188
}

0 commit comments

Comments
 (0)