aboutsummaryrefslogtreecommitdiff
path: root/apply.c
diff options
context:
space:
mode:
Diffstat (limited to 'apply.c')
-rw-r--r--apply.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/apply.c b/apply.c
index d044c95d50..b6dd1066a0 100644
--- a/apply.c
+++ b/apply.c
@@ -5022,6 +5022,10 @@ static int apply_option_parse_directory(const struct option *opt,
strbuf_reset(&state->root);
strbuf_addstr(&state->root, arg);
+
+ if (strbuf_normalize_path(&state->root) < 0)
+ return error(_("unable to normalize directory: '%s'"), arg);
+
strbuf_complete(&state->root, '/');
return 0;
}