aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archival/tar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archival/tar.c b/archival/tar.c
index cf972f41d..585f0629f 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -795,7 +795,7 @@ int tar_main(int argc, char **argv)
/* TODO: This is the same as in ar, separate function ? */
while (optind < argc) {
char *filename_ptr = last_char_is(argv[optind], '/');
- if (filename_ptr) {
+ if (filename_ptr > argv[optind]) {
*filename_ptr = '\0';
}
tar_handle->accept = llist_add_to(tar_handle->accept, argv[optind]);