diff options
Diffstat (limited to 'archival/tar.c')
-rw-r--r-- | archival/tar.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/archival/tar.c b/archival/tar.c index 1e3cecf..d43c8de 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -397,17 +397,8 @@ static int FAST_FUNC writeFileToTarball(const char *fileName, struct stat *statb DBG("writeFileToTarball('%s')", fileName); - /* Strip leading '/' (must be before memorizing hardlink's name) */ - header_name = fileName; - while (header_name[0] == '/') { - static smallint warned; - - if (!warned) { - bb_error_msg("removing leading '/' from member names"); - warned = 1; - } - header_name++; - } + /* Strip leading '/' and such (must be before memorizing hardlink's name) */ + header_name = strip_unsafe_prefix(fileName); if (header_name[0] == '\0') return TRUE; |