Skip to content

Commit ebdc51a

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 4ded373 commit ebdc51a

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

377377
if (!fp) {
378-
if (errno != ENOENT && errno != ENOTDIR)
378+
if (errno != ENOENT && errno != ENOTDIR && errno != EINVAL)
379379
warn_on_inaccessible(path);
380380
return NULL;
381381
}

0 commit comments

Comments
 (0)