path: root/setup.c
diff options
authorJunio C Hamano <>2017-05-30 00:23:33 (GMT)
committerJunio C Hamano <>2017-05-30 00:29:00 (GMT)
commitc7054209d65db430bdbcb2243288e63cea3e417c (patch)
tree215774833cded6430026ed7c88a646143223c28e /setup.c
parentdc5a18b3643553cacd6f1a3e4bff6a678b067055 (diff)
treewide: use is_missing_file_error() where ENOENT and ENOTDIR are checked
Using the is_missing_file_error() helper introduced in the previous step, update all hits from $ git grep -e ENOENT --and -e ENOTDIR There are codepaths that only check ENOENT, and it is possible that some of them should be checking both. Updating them is kept out of this step deliberately, as we do not want to change behaviour in this step. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'setup.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/setup.c b/setup.c
index 8f64fbd..bb6a2c1 100644
--- a/setup.c
+++ b/setup.c
@@ -147,7 +147,7 @@ int check_filename(const char *prefix, const char *arg)
name = arg;
if (!lstat(name, &st))
return 1; /* file exists */
- if (errno == ENOENT || errno == ENOTDIR)
+ if (is_missing_file_error(errno))
return 0; /* file does not exist */
die_errno("failed to stat '%s'", arg);