summaryrefslogtreecommitdiffstats
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
parentfdac7d46bc06da8ef7b404898b831cc1ebc6c94f (diff)
downloadtdeutils-4a66f15d28b50197e79974c6ff81e67f908b4eb1.tar.gz
tdeutils-4a66f15d28b50197e79974c6ff81e67f908b4eb1.zip
Ark: Add support for Lzip
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-rw-r--r--ark/archiveformatinfo.cpp3
-rw-r--r--ark/ark.desktop2
-rw-r--r--ark/ark_part.desktop2
-rw-r--r--ark/compressedfile.cpp8
-rw-r--r--ark/tar.cpp19
-rw-r--r--doc/ark/index.docbook3
-rw-r--r--doc/ark/man-ark.1.docbook2
7 files changed, 26 insertions, 13 deletions
diff --git a/ark/archiveformatinfo.cpp b/ark/archiveformatinfo.cpp
index 93cf928..c99ef56 100644
--- a/ark/archiveformatinfo.cpp
+++ b/ark/archiveformatinfo.cpp
@@ -53,7 +53,7 @@ void ArchiveFormatInfo::buildFormatInfos()
addFormatInfo( TAR_FORMAT, "application/x-tzo", ".tar.lzo" );
addFormatInfo( TAR_FORMAT, "application/x-tarz", ".tar.z" );
addFormatInfo( TAR_FORMAT, "application/x-tbz", ".tar.bz2" );
- addFormatInfo( TAR_FORMAT, "application/x-tlz", ".tar.lzma" );
+ addFormatInfo( TAR_FORMAT, "application/x-tlz", ".tar.lz" );
addFormatInfo( TAR_FORMAT, "application/x-tar", ".tar" );
addFormatInfo( LHA_FORMAT, "application/x-lha", ".lha" );
@@ -65,6 +65,7 @@ void ArchiveFormatInfo::buildFormatInfos()
addFormatInfo( COMPRESSED_FORMAT, "application/x-gzip", ".gz" );
addFormatInfo( COMPRESSED_FORMAT, "application/x-bzip", ".bz" );
addFormatInfo( COMPRESSED_FORMAT, "application/x-bzip2", ".bz2" );
+ addFormatInfo( COMPRESSED_FORMAT, "application/x-lzip", ".lz" );
addFormatInfo( COMPRESSED_FORMAT, "application/x-lzma", ".lzma" );
addFormatInfo( COMPRESSED_FORMAT, "application/x-lzop", ".lzo" );
addFormatInfo( COMPRESSED_FORMAT, "application/x-compress", ".Z" );
diff --git a/ark/ark.desktop b/ark/ark.desktop
index 9936595..60ab3ae 100644
--- a/ark/ark.desktop
+++ b/ark/ark.desktop
@@ -1,5 +1,5 @@
[Desktop Entry]
-MimeType=application/x-gzip;application/x-lha;application/x-tar;application/x-tgz;application/x-tbz;application/x-zip;application/zip;application/x-bzip;application/x-tzo;application/x-lzop;application/x-rar;application/x-zoo;application/x-tarz;application/x-archive;application/x-bzip2;application/x-jar;application/x-deb;application/x-ace;application/x-7z;application/x-arc;application/x-arj;application/x-compress;application/x-cpio;application/x-pak;application/x-lzma;application/x-xz;application/x-txz;application/x-tlz
+MimeType=application/x-gzip;application/x-lha;application/x-tar;application/x-tgz;application/x-tbz;application/x-zip;application/zip;application/x-bzip;application/x-tzo;application/x-lzop;application/x-rar;application/x-zoo;application/x-tarz;application/x-archive;application/x-bzip2;application/x-jar;application/x-deb;application/x-ace;application/x-7z;application/x-arc;application/x-arj;application/x-compress;application/x-cpio;application/x-pak;application/x-lzma;application/x-xz;application/x-txz;application/x-lzip;application/x-tlz
GenericName=Archiving Tool
GenericName[af]=Argiveer Program
GenericName[ar]=أداة أرشفة
diff --git a/ark/ark_part.desktop b/ark/ark_part.desktop
index c455f7e..0c8ba07 100644
--- a/ark/ark_part.desktop
+++ b/ark/ark_part.desktop
@@ -1,5 +1,5 @@
[Desktop Entry]
-MimeType=application/x-gzip;application/x-lha;application/x-tar;application/x-tgz;application/x-tbz;application/x-zip;application/x-bzip;application/x-tzo;application/x-lzop;application/x-rar;application/x-zoo;application/x-tarz;application/x-archive;application/x-bzip2;application/x-jar;application/x-deb;application/x-ace;application/x-7z;application/x-arc;application/x-arj;application/x-compress;application/x-cpio;application/x-pak;application/x-lzma;application/x-xz;application/x-tlz;application/x-txz
+MimeType=application/x-gzip;application/x-lha;application/x-tar;application/x-tgz;application/x-tbz;application/x-zip;application/x-bzip;application/x-tzo;application/x-lzop;application/x-rar;application/x-zoo;application/x-tarz;application/x-archive;application/x-bzip2;application/x-jar;application/x-deb;application/x-ace;application/x-7z;application/x-arc;application/x-arj;application/x-compress;application/x-cpio;application/x-pak;application/x-lzma;application/x-xz;application/x-txz;application/x-lzip;application/x-tlz
Comment=Archive Handling Tool
Comment[af]=Argief Handtering Program
Comment[ar]=أداة التعامل مع الملفات المضغوطة
diff --git a/ark/compressedfile.cpp b/ark/compressedfile.cpp
index a6b0ddc..86e5fbd 100644
--- a/ark/compressedfile.cpp
+++ b/ark/compressedfile.cpp
@@ -124,6 +124,11 @@ void CompressedFile::initData()
m_archiver_program = "bzip2";
m_defaultExtensions << ".bz2" << ".bz";
}
+ if (mimeType == "application/x-lzip") {
+ m_unarchiver_program = "lzip";
+ m_archiver_program = "lzip";
+ m_defaultExtensions << ".lz";
+ }
if ( mimeType == "application/x-lzma" )
{
m_unarchiver_program = "unlzma";
@@ -187,6 +192,9 @@ void CompressedFile::open()
TDEProcess *kp = m_currentProcess = new TDEProcess;
kp->clearArguments();
*kp << m_unarchiver_program << "-f" ;
+ if (m_unarchiver_program == "lzip") {
+ *kp << "-d";
+ }
if ( m_unarchiver_program == "lzop")
{
*kp << "-d";
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;
}
diff --git a/doc/ark/index.docbook b/doc/ark/index.docbook
index 0516923..b3588d4 100644
--- a/doc/ark/index.docbook
+++ b/doc/ark/index.docbook
@@ -42,6 +42,7 @@
<keyword>KDE</keyword>
<keyword>gzip</keyword>
<keyword>gunzip</keyword>
+<keyword>lzip</keyword>
<keyword>tar</keyword>
<keyword>archive</keyword>
<keyword>zip</keyword>
@@ -58,7 +59,7 @@
<para>&ark; is a program for managing various archive formats within the
&kde; environment. Archives can be viewed, extracted, created and
modified from within &ark;. The program can handle various formats such
-as <command>tar</command>, <command>gzip</command>,
+as <command>tar</command>, <command>gzip</command>, <command>lzip</command>,
<command>bzip2</command>, <command>zip</command>, <command>rar</command> and
<command>lha</command> (if appropriate command-line programs are
installed). &ark; can work closely with &konqueror; in the &kde;
diff --git a/doc/ark/man-ark.1.docbook b/doc/ark/man-ark.1.docbook
index e0a8a5d..164fbde 100644
--- a/doc/ark/man-ark.1.docbook
+++ b/doc/ark/man-ark.1.docbook
@@ -153,7 +153,7 @@ already exist.</para>
<refsect1>
<title>See Also</title>
-<para>tar(1), gzip(1), bzip2(1), zip(1), rar(1), lha(1)</para>
+<para>tar(1), gzip(1), bzip2(1), lzip(1), zip(1), rar(1), lha(1)</para>
<para>More detailed user documentation is available from <ulink
url="help:/ark">help:/ark</ulink>