From a27957daddf74ceacdb776832c8f47146224db92 Mon Sep 17 00:00:00 2001 From: merakor Date: Sat, 13 Mar 2021 21:08:49 +0000 Subject: tar_extract(): change pax component stripping string The substitution we used on pax didn't exactly match the behaviour of tar implementations that supported `--strip-components`. This change makes sure that we actually DO strip a component no matter what and we don't have inconsistencies between the choices we deliver. FossilOrigin-Name: 3c2771c89e72ef79de6aa0d1f53ad1bf3a11b654e022ee5c5d0761da01e1c335 --- src/cpt-lib.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpt-lib.in b/src/cpt-lib.in index b137994..d9a5808 100644 --- a/src/cpt-lib.in +++ b/src/cpt-lib.in @@ -492,7 +492,7 @@ tar_extract() { # sacrifice speed. Fortunately, we don't have to make such a choice when # using pax. case "${extract##*/}" in - pax) decompress "$1" | pax -r -s '/[^\/]*\///' ;; + pax) decompress "$1" | pax -r -s '/[^\/]*/./' ;; gtar|bsdtar) decompress "$1" | "$tar" xf - --strip-components 1 ;; tar) decompress "$1" > .ktar -- cgit v1.2.3