]> git.ipfire.org Git - thirdparty/git.git/blobdiff - apply.c
is_ntfs_dotgit(): only verify the leading segment
[thirdparty/git.git] / apply.c
diff --git a/apply.c b/apply.c
index 0c7b25989cdf58b411190744c97d93450be9b53e..d92e58f45362e518bf47e86f587bf7e14468e126 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -3882,9 +3882,9 @@ static int check_unsafe_path(struct patch *patch)
        if (!patch->is_delete)
                new_name = patch->new_name;
 
-       if (old_name && !verify_path(old_name))
+       if (old_name && !verify_path(old_name, patch->old_mode))
                return error(_("invalid path '%s'"), old_name);
-       if (new_name && !verify_path(new_name))
+       if (new_name && !verify_path(new_name, patch->new_mode))
                return error(_("invalid path '%s'"), new_name);
        return 0;
 }