Skip to content

Commit d6fb624

Browse files
committed
Merge branch 'jk/config-warn-on-inaccessible-paths'
The attribute system may be asked for a path that itself or its leading directories no longer exists in the working tree. Failure to open per-directory .gitattributes with error status other than ENOENT and ENOTDIR are diagnosed. * jk/config-warn-on-inaccessible-paths: attr: failure to open a .gitattributes file is OK with ENOTDIR
2 parents d6e32f6 + 8e950da commit d6fb624

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

attr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ static struct attr_stack *read_attr_from_file(const char *path, int macro_ok)
353353
int lineno = 0;
354354

355355
if (!fp) {
356-
if (errno != ENOENT)
356+
if (errno != ENOENT && errno != ENOTDIR)
357357
warn_on_inaccessible(path);
358358
return NULL;
359359
}

0 commit comments

Comments
 (0)