summaryrefslogtreecommitdiffstats
path: root/ark/tar.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2018-08-18 15:36:09 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2018-08-18 15:36:09 +0900
commit4a7a9f41a5d5084aa98379422facc449888552c0 (patch)
treecd147247e34c101a85d94276d46a7eb12af19a07 /ark/tar.cpp
parent4a66f15d28b50197e79974c6ff81e67f908b4eb1 (diff)
downloadtdeutils-4a7a9f41a5d5084aa98379422facc449888552c0.tar.gz
tdeutils-4a7a9f41a5d5084aa98379422facc449888552c0.zip
A few code clean up and improvements
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'ark/tar.cpp')
-rw-r--r--ark/tar.cpp30
1 files changed, 13 insertions, 17 deletions
diff --git a/ark/tar.cpp b/ark/tar.cpp
index 33f27a6..0c6f3d2 100644
--- a/ark/tar.cpp
+++ b/ark/tar.cpp
@@ -184,7 +184,6 @@ void TarArch::updateProgress( TDEProcess * _proc, char *_buffer, int _bufflen )
_proc->kill();
KMessageBox::error(0, i18n("Trouble writing to the archive..."));
kdWarning( 1601 ) << "trouble updating tar archive" << endl;
- //kdFatal( 1601 ) << "trouble updating tar archive" << endl;
}
}
@@ -198,17 +197,16 @@ TQString TarArch::getCompressor()
if ( m_fileMimeType == "application/x-tgz" )
return TQString( "gzip" );
- if ( m_fileMimeType == "application/x-tbz" )
+ if ( m_fileMimeType == "application/x-tbz" )
return TQString( "bzip2" );
- if (m_fileMimeType == "application/x-tlz") {
- return TQString("lzip");
- }
+ if ( m_fileMimeType == "application/x-tlz" )
+ return TQString( "lzip" );
- if ( m_fileMimeType == "application/x-txz" )
- return TQString( "xz" );
+ if ( m_fileMimeType == "application/x-txz" )
+ return TQString( "xz" );
- if( m_fileMimeType == "application/x-tzo" )
+ if ( m_fileMimeType == "application/x-tzo" )
return TQString( "lzop" );
return TQString();
@@ -223,24 +221,22 @@ TQString TarArch::getUnCompressor()
if ( m_fileMimeType == "application/x-tgz" )
return TQString( "gunzip" );
- if ( m_fileMimeType == "application/x-tbz" )
+ if ( m_fileMimeType == "application/x-tbz" )
return TQString( "bunzip2" );
- if (m_fileMimeType == "application/x-tlz") {
- return TQString("lzip");
- }
+ if ( m_fileMimeType == "application/x-tlz" )
+ return TQString( "lzip" );
- if ( m_fileMimeType == "application/x-txz" )
+ if ( m_fileMimeType == "application/x-txz" )
return TQString( "unxz" );
- if( m_fileMimeType == "application/x-tzo" )
+ if ( m_fileMimeType == "application/x-tzo" )
return TQString( "lzop" );
return TQString();
}
-void
-TarArch::open()
+void TarArch::open()
{
if ( compressed )
TQFile::remove(tmpfile); // just to make sure
@@ -396,7 +392,7 @@ void TarArch::createTmp()
if (strUncompressor == "lzip") {
*kp << "-d";
}
- if (strUncompressor == "lzop")
+ else if (strUncompressor == "lzop")
{
// setting up a pty for lzop, since it doesn't like stdin to
// be /dev/null ( "no filename allowed when reading from stdin" )