Skip to content

Commit d70f101

Browse files
committed
mingw: Suppress warning that <commit>:.gitattributes does not exist
On Windows, a file name containing a colon is illegal. We should therefore expect the corresponding errno when `fopen()` is called for a path of the form <commit>:.gitattributes. This fixes #255. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 61d7ca2 commit d70f101

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
@@ -468,7 +468,7 @@ static struct attr_stack *read_attr_from_file(const char *path, int macro_ok)
468468
int lineno = 0;
469469

470470
if (!fp) {
471-
if (errno != ENOENT && errno != ENOTDIR)
471+
if (errno != ENOENT && errno != ENOTDIR && errno != EINVAL)
472472
warn_on_inaccessible(path);
473473
return NULL;
474474
}

0 commit comments

Comments
 (0)