Summary: | Could Ark find unrar instead of rar? | ||
---|---|---|---|
Product: | [Applications] ark | Reporter: | Thibaut Cousin <kde> |
Component: | general | Assignee: | Helio Castro <helio> |
Status: | CLOSED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Thibaut Cousin
2002-10-11 10:15:32 UTC
Subject: kdeutils/ark CVS commit by domseichter: Fix for Bug 49009. If rar is not found unrar is used. CCMAIL: 49009-done@bugs.kde.org M +13 -1 rar.cpp 1.14 --- kdeutils/ark/rar.cpp #1.13:1.14 @@ -36,7 +36,9 @@ // KDE includes #include <kdebug.h> +#include <kglobal.h> #include <klocale.h> #include <kmessagebox.h> #include <kprocess.h> +#include <kstddirs.h> // ark includes @@ -53,6 +55,16 @@ RarArch::RarArch( ArkSettings *_settings { kdDebug(1601) << "RarArch constructor" << endl; + + bool have_rar = !KGlobal::dirs()->findExe( "rar" ).isNull(); + bool have_unrar = !KGlobal::dirs()->findExe( "unrar" ).isNull(); + m_archiver_program = "rar"; - m_unarchiver_program = "rar"; // some distributions of rar don't have unrar (bug #7112) + m_unarchiver_program = "unrar"; + if( !have_rar && have_unrar ) + m_archiver_program = "unrar"; + + if( !have_unrar && have_rar ) + m_unarchiver_program = "rar"; + verifyUtilityIsAvailable(m_archiver_program, m_unarchiver_program); |