aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-03-13 21:08:49 +0000
committermerakor <cem@ckyln.com>2021-03-13 21:08:49 +0000
commita27957daddf74ceacdb776832c8f47146224db92 (patch)
tree99647696061452938848cb2c47a4ca560b0918ec /src
parent910bcc865a804ee926d02817958e655643cec07b (diff)
downloadcpt-a27957daddf74ceacdb776832c8f47146224db92.tar.gz
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
Diffstat (limited to 'src')
-rw-r--r--src/cpt-lib.in2
1 files changed, 1 insertions, 1 deletions
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