Code

t2200, t7004: Avoid glob pattern that also matches files
[git.git] / builtin-apply.c
index f312798af38553e0badeda9732736a62460eae05..106be94105dbff4c150deac7854a50c67ecd974d 100644 (file)
@@ -2360,7 +2360,7 @@ static int check_to_create_blob(const char *new_name, int ok_if_exists)
                 * In such a case, path "new_name" does not exist as
                 * far as git is concerned.
                 */
-               if (has_symlink_leading_path(strlen(new_name), new_name))
+               if (has_symlink_leading_path(new_name, strlen(new_name)))
                        return 0;
 
                return error("%s: already exists in working directory", new_name);