]> git.ipfire.org Git - thirdparty/git.git/blobdiff - apply.c
Sync with 2.15.3
[thirdparty/git.git] / apply.c
diff --git a/apply.c b/apply.c
index 321a9fa68d491f7e5e89dc9e398b067f67a10c77..5a147ced30087de57a17ef351fa4c569694ba4e4 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;
 }