Skip to content

Commit 9c8564a

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 b7a600d commit 9c8564a

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

728728
if (!fp) {
729-
if (errno != ENOENT && errno != ENOTDIR)
729+
if (errno != ENOENT && errno != ENOTDIR && errno != EINVAL)
730730
warn_on_inaccessible(path);
731731
return NULL;
732732
}

0 commit comments

Comments
 (0)