diff options
Diffstat (limited to 'builtin-apply.c')
-rw-r--r-- | builtin-apply.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin-apply.c b/builtin-apply.c index bf528966ca..6c3db60b65 100644 --- a/builtin-apply.c +++ b/builtin-apply.c @@ -3130,10 +3130,10 @@ int cmd_apply(int argc, const char **argv, const char *unused_prefix) inaccurate_eof = 1; continue; } - if (!strncmp(arg, "--root=", strlen("--root="))) { + if (!prefixcmp(arg, "--root=")) { arg += strlen("--root="); root_len = strlen(arg); - if (root_len && arg[root_len + 1] != '/') { + if (root_len && arg[root_len - 1] != '/') { char *new_root; root = new_root = xmalloc(root_len + 2); strcpy(new_root, arg); |