diff options
author | Antonio Diaz Diaz <[email protected]> | 2018-08-16 01:23:11 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2018-08-16 01:23:46 +0200 |
commit | 4a66f15d28b50197e79974c6ff81e67f908b4eb1 (patch) | |
tree | 8f177bfef4a3fe664121565c71ad2adaac347e6f /ark | |
parent | fdac7d46bc06da8ef7b404898b831cc1ebc6c94f (diff) | |
download | tdeutils-4a66f15d28b50197e79974c6ff81e67f908b4eb1.tar.gz tdeutils-4a66f15d28b50197e79974c6ff81e67f908b4eb1.zip |
Ark: Add support for Lzip
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'ark')
-rw-r--r-- | ark/archiveformatinfo.cpp | 3 | ||||
-rw-r--r-- | ark/ark.desktop | 2 | ||||
-rw-r--r-- | ark/ark_part.desktop | 2 | ||||
-rw-r--r-- | ark/compressedfile.cpp | 8 | ||||
-rw-r--r-- | ark/tar.cpp | 19 |
5 files changed, 23 insertions, 11 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; } |