From: Tim Kientzle Date: Thu, 8 May 2008 20:48:01 +0000 (-0400) Subject: Just skip entries where --strip-components removes everything. X-Git-Tag: v2.6.0~255 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b907305f3d853cb14fc91f8108d7a18997d92a00;p=thirdparty%2Flibarchive.git Just skip entries where --strip-components removes everything. Previously, this was failing for dir entries that had exactly the right number of components, e.g. "a/" with --strip-components=1, leading to odd warnings about "Invalid empty pathname" PR: bin/121158 SVN-Revision: 37 --- diff --git a/tar/util.c b/tar/util.c index 68ff8d8f5..a539b2885 100644 --- a/tar/util.c +++ b/tar/util.c @@ -368,6 +368,10 @@ edit_pathname(struct bsdtar *bsdtar, struct archive_entry *entry) return (1); } } + while (*name == '/') + ++name; + if (*name == '\0') + return (1); } /* Strip redundant leading '/' characters. */