sha1_file: refactor read_object
[gitweb.git] / apply.c
diff --git a/apply.c b/apply.c
index c49cef0637355d33a7a1636fb283210784f14e02..854faa67795bcd356b33420f46260f208c2ec047 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -3741,7 +3741,7 @@ static int check_to_create(struct apply_state *state,
                        return 0;
 
                return EXISTS_IN_WORKTREE;
-       } else if ((errno != ENOENT) && (errno != ENOTDIR)) {
+       } else if (!is_missing_file_error(errno)) {
                return error_errno("%s", new_name);
        }
        return 0;