Skip to content

Commit 28ced5c

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 8c5a690 commit 28ced5c

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

444444
if (!fp) {
445-
if (errno != ENOENT && errno != ENOTDIR)
445+
if (errno != ENOENT && errno != ENOTDIR && errno != EINVAL)
446446
warn_on_inaccessible(path);
447447
return NULL;
448448
}

0 commit comments

Comments
 (0)