]> git.ipfire.org Git - thirdparty/git.git/blobdiff - apply.c
t3701-add-interactive: tighten the check of trace output
[thirdparty/git.git] / apply.c
diff --git a/apply.c b/apply.c
index 134dc7ba78cddd99406b78a97898bd8a32393b4c..2d1cfe4dbb563e4601f5fec16d6ae2fe88fee80c 100644 (file)
--- a/apply.c
+++ b/apply.c
@@ -3860,9 +3860,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;
 }