From e081d55616d87ceb3525888ace743dce4281971c Mon Sep 17 00:00:00 2001 From: "Yuriy M. Kaminskiy" Date: Thu, 13 Jul 2017 20:02:38 +0200 Subject: [PATCH] Ticket #3840: (de)compression from menu broken due to bad quoting If the file is not compressed and DECOMP is empty, it should be replaced by *nothing*, not an empty argument. Broken in the following commit: becc0d01d03aadfd8ee89e8ce7a18b81a4b74495 Signed-off-by: Yury V. Zaytsev --- misc/mc.menu.in | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/misc/mc.menu.in b/misc/mc.menu.in index cf42421ae..8488a8750 100644 --- a/misc/mc.menu.in +++ b/misc/mc.menu.in @@ -241,7 +241,8 @@ y Gzip or gunzip current file case %f in *.gz|*.[zZ]) DECOMP=-d;; esac - gzip "$DECOMP" -v %f + # Do *not* add quotes around $DECOMP! + gzip $DECOMP -v %f + t t Y Gzip or gunzip tagged files @@ -250,7 +251,7 @@ Y Gzip or gunzip tagged files case "$i" in *.gz|*.[zZ]) DECOMP=-d;; esac - gzip "$DECOMP" -v "$i" + gzip $DECOMP -v "$i" done + ! t t @@ -259,7 +260,7 @@ b Bzip2 or bunzip2 current file case %f in *.bz2) DECOMP=-d;; esac - bzip2 "$DECOMP" -v %f + bzip2 $DECOMP -v %f + t t B Bzip2 or bunzip2 tagged files @@ -268,7 +269,7 @@ B Bzip2 or bunzip2 tagged files case "$i" in *.bz2) DECOMP=-d;; esac - bzip2 "$DECOMP" -v "$i" + bzip2 $DECOMP -v "$i" done + f \.tar.gz$ | f \.tgz$ | f \.tpz$ | f \.tar.Z$ | f \.tar.z$ | f \.tar.bz2$ | f \.tar.F$ & t r & ! t t