summaryrefslogtreecommitdiffstats
path: root/ark/tar.cpp
diff options
context:
space:
mode:
authorAntonio Diaz Diaz <antonio@gnu.org>2018-08-16 01:23:11 +0200
committerSlávek Banko <slavek.banko@axis.cz>2018-08-16 01:23:46 +0200
commit4a66f15d28b50197e79974c6ff81e67f908b4eb1 (patch)
tree8f177bfef4a3fe664121565c71ad2adaac347e6f /ark/tar.cpp
parentfdac7d46bc06da8ef7b404898b831cc1ebc6c94f (diff)
downloadtdeutils-4a66f15d28b50197e79974c6ff81e67f908b4eb1.tar.gz
tdeutils-4a66f15d28b50197e79974c6ff81e67f908b4eb1.zip
Ark: Add support for Lzip
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'ark/tar.cpp')
-rw-r--r--ark/tar.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/ark/tar.cpp b/ark/tar.cpp
index cd8acee..33f27a6 100644
--- a/ark/tar.cpp
+++ b/ark/tar.cpp
@@ -201,8 +201,9 @@ TQString TarArch::getCompressor()
if ( m_fileMimeType == "application/x-tbz" )
return TQString( "bzip2" );
- if ( m_fileMimeType == "application/x-tlz" )
- return TQString( "lzma" );
+ if (m_fileMimeType == "application/x-tlz") {
+ return TQString("lzip");
+ }
if ( m_fileMimeType == "application/x-txz" )
return TQString( "xz" );
@@ -225,8 +226,9 @@ TQString TarArch::getUnCompressor()
if ( m_fileMimeType == "application/x-tbz" )
return TQString( "bunzip2" );
- if ( m_fileMimeType == "application/x-tlz" )
- return TQString( "unlzma" );
+ if (m_fileMimeType == "application/x-tlz") {
+ return TQString("lzip");
+ }
if ( m_fileMimeType == "application/x-txz" )
return TQString( "unxz" );
@@ -391,6 +393,9 @@ void TarArch::createTmp()
kdDebug(1601) << "Uncompressor is " << strUncompressor << endl;
*kp << strUncompressor;
TDEProcess::Communication flag = TDEProcess::AllOutput;
+ if (strUncompressor == "lzip") {
+ *kp << "-d";
+ }
if (strUncompressor == "lzop")
{
// setting up a pty for lzop, since it doesn't like stdin to
@@ -789,12 +794,10 @@ void TarArch::test()
*kp << uncomp;
- if( uncomp == "bunzip2" || uncomp == "gunzip" || uncomp == "lzop" )
- {
+ if ((uncomp == "bunzip2") || (uncomp == "gunzip") || (uncomp == "lzip") || (uncomp == "lzop")) {
*kp << "-t";
}
- else
- {
+ else {
Arch::test();
return;
}