mirror of https://github.com/mirror/busybox.git
tar: fix tar -T to add entries in the exact order as the input list
This fixes tar to order files in tarball correctly in this case: $ touch 1 2 3; echo -e '1\n2\n3' | tar -T- -c | tar t 1 2 3 Signed-off-by: SASAKI Suguru <suguru@sonik.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>1_22_stable
parent
fc364ba9e3
commit
73fbe9dc86
|
@ -679,14 +679,12 @@ static llist_t *append_file_list_to_list(llist_t *list)
|
||||||
char *cp = last_char_is(line, '/');
|
char *cp = last_char_is(line, '/');
|
||||||
if (cp > line)
|
if (cp > line)
|
||||||
*cp = '\0';
|
*cp = '\0';
|
||||||
llist_add_to(&newlist, line);
|
llist_add_to_end(&newlist, line);
|
||||||
}
|
}
|
||||||
fclose(src_stream);
|
fclose(src_stream);
|
||||||
}
|
}
|
||||||
return newlist;
|
return newlist;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
# define append_file_list_to_list(x) 0
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//usage:#define tar_trivial_usage
|
//usage:#define tar_trivial_usage
|
||||||
|
|
Loading…
Reference in New Issue