summaryrefslogtreecommitdiffstats
path: root/ark/tar.cpp
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2012-06-17 19:09:27 +0200
committerSlávek Banko <slavek.banko@axis.cz>2012-06-17 19:15:56 +0200
commit1c84948d57c174bcd9732a5a0a51d42d3626d000 (patch)
treebea1edb0356d7d6809d03f27ff37e89273fbe595 /ark/tar.cpp
parentba8d2a9f33e4921a7188936098ad76af8d9ab8be (diff)
downloadtdeutils-1c84948d57c174bcd9732a5a0a51d42d3626d000.tar.gz
tdeutils-1c84948d57c174bcd9732a5a0a51d42d3626d000.zip
[Ark] Repairs and extensions
Added support for Arj Added support for check archives Added support for password processing Fix show broken filenames into real UTF-8 This closes Bug 1030
Diffstat (limited to 'ark/tar.cpp')
-rw-r--r--ark/tar.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/ark/tar.cpp b/ark/tar.cpp
index 4cdb792..1c1fac9 100644
--- a/ark/tar.cpp
+++ b/ark/tar.cpp
@@ -785,5 +785,42 @@ void TarArch::customEvent( TQCustomEvent *ev )
}
}
+void TarArch::test()
+{
+ clearShellOutput();
+
+ KProcess *kp = m_currentProcess = new KProcess;
+ kp->clearArguments();
+
+ TQString uncomp = getUnCompressor();
+
+ *kp << uncomp;
+
+ if( uncomp == "bunzip2" || uncomp == "gunzip" || uncomp == "lzop" )
+ {
+ *kp << "-t";
+ }
+ else
+ {
+ Arch::test();
+ return;
+ }
+
+ *kp << m_filename;
+
+ connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ),
+ SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, SIGNAL( receivedStderr(KProcess*, char*, int) ),
+ SLOT( slotReceivedOutput(KProcess*, char*, int) ) );
+ connect( kp, SIGNAL( processExited(KProcess*) ),
+ SLOT( slotTestExited(KProcess*) ) );
+
+ if ( !kp->start( KProcess::NotifyOnExit, KProcess::AllOutput ) )
+ {
+ KMessageBox::error( 0, i18n( "Could not start a subprocess." ) );
+ emit sigTest( false );
+ }
+}
+
#include "tar.moc"
// kate: space-indent on;