Skip to content
Permalink
Browse files

fixup! dir.c: regression fix for add_excludes with fscache

In my previous fixup, I forgot to close(fd)... D'oh. Squashed one bug,
introduced another...

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
  • Loading branch information...
dscho committed Dec 21, 2017
1 parent 183cb67 commit 512e5d63ecb3be594daee6ef81bd28a3b2bb2dc7
Showing with 2 additions and 1 deletion.
  1. +2 −1 dir.c
3 dir.c
@@ -788,8 +788,9 @@ static int add_excludes(const char *fname, const char *base, int baselen,
fd = open(fname, O_RDONLY);
if (fd < 0)
warn_on_fopen_errors(fname);
if (S_ISLNK(st.st_mode) && fstat(fd, &st) < 0) {
else if (S_ISLNK(st.st_mode) && fstat(fd, &st) < 0) {
warn_on_fopen_errors(fname);
close(fd);
fd = -1;
}
}

0 comments on commit 512e5d6

Please sign in to comment.
You can’t perform that action at this time.