diff options
Diffstat (limited to 'ark/rar.cpp')
-rw-r--r-- | ark/rar.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ark/rar.cpp b/ark/rar.cpp index 742df1c..071dc9e 100644 --- a/ark/rar.cpp +++ b/ark/rar.cpp @@ -128,7 +128,14 @@ void RarArch::open() m_finished = false; KProcess *kp = m_currentProcess = new KProcess; - *kp << m_unarchiver_program << "v" << "-c-" << m_filename; + *kp << m_unarchiver_program << "v" << "-c-"; + + if ( !m_password.isEmpty() ) + *kp << "-p" + m_password; + else + *kp << "-p-"; + + *kp << m_filename; connect( kp, SIGNAL( receivedStdout(KProcess*, char*, int) ), SLOT( slotReceivedTOC(KProcess*, char*, int) ) ); |