Fix for bug 383: attempting to "tar c /" would error out because stripping
trailing / turns that into an empty string.
This commit is contained in:
parent
828548ab56
commit
92255d60b8
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user