From b907305f3d853cb14fc91f8108d7a18997d92a00 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Thu, 8 May 2008 16:48:01 -0400 Subject: [PATCH] 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 --- tar/util.c | 4 ++++ 1 file changed, 4 insertions(+) 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. */ -- 2.47.3