Version: (using KDE KDE 3.5.4) Installed from: Debian testing/unstable Packages OS: Linux When trying to open a test password-protected RAR archive, ark fails with the helpful message "An error occurred while trying to open the archive " ;) $ ark test.rar kio (KMimeType): WARNING: mimetype not valid '' (missing entry in the file ?) kio (KMimeType): WARNING: mimetype not valid '' (missing entry in the file ?) kparts: WARNING: StatusBarExtension::removeStatusBarItem. Widget not found : [KPushButton pointer (0x80b99a8) to widget CancelButton, geometry=100x30+0+0] chealer@vinci:~$ This is ark 2.6.3, which should apparently support password-protected archives. Opening RAR archives without password protection seems to work fine.
Created attachment 18010 [details] Password-protected RAR archive
I get this too (Ark version ~3.5.5 on Gentoo ~x86). Temporary solution: Open the archive with "unrar e /filepath/filename" in terminal.
*** Bug 146482 has been marked as a duplicate of this bug. ***
Created attachment 22008 [details] patches the password protected rar files extraction problem patch that fix the extraction process of password protected rar files
Oops i've forgot to cite the necessary explanation: I read the source codes of the package ark and i think i've found the bug. Even the GUI implements a dialog for asking the password(it works with zip files), it doesn't work with RAR files because, the program first runs "unrar" or equivalent unarchiver program it then checks the m_lastshelloutput for the string "password incorrect ?". The problem is that the program unrar doesn't verbose this string, it justs ask for it. So ark cannot detect if the archive is a password protected one and returns unsuccessfully. If unrar is called with the switch "p-", it doesn't query for password and the standard output now contains a "(password incorrect ?)" for every file in the archive. The patch that fix this problem is attached, and it seems that it works with password protected and ordinary rar files.
Fix opening password protected RAR archives, patch by Ozan Çağlayan <ozan@pardus.org.tr>, thanks! BUG:FIXED:135099 M +2 -0 rar.cpp --- branches/KDE/3.5/kdeutils/ark/rar.cpp #733549:733550 @@ -226,6 +226,8 @@ if ( !m_password.isEmpty() ) *kp << "-p" + m_password; + else + *kp << "-p-"; if ( !ArkSettings::extractOverwrite() ) {