mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 18:32:50 +00:00
kwalletd: use definition to check minor version
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
df4c601719
commit
ad6df73e56
1 changed files with 2 additions and 3 deletions
|
@ -40,6 +40,7 @@
|
|||
#include <assert.h>
|
||||
|
||||
#define KWALLET_VERSION_MAJOR 0
|
||||
// has been 0 until 4.13, 1 until 4.20
|
||||
#define KWALLET_VERSION_MINOR 2
|
||||
|
||||
using namespace KWallet;
|
||||
|
@ -192,9 +193,7 @@ int Backend::openInternal(WId w)
|
|||
return -4; // unknown version
|
||||
}
|
||||
|
||||
// 0 has been the MINOR version until 4.13
|
||||
// 1 has been the MINOR version until 4.20
|
||||
if (magicBuf[1] == 2) {
|
||||
if (magicBuf[1] == KWALLET_VERSION_MINOR) {
|
||||
kDebug() << "Wallet new enough, using new hash";
|
||||
} else if (magicBuf[1] != 0){
|
||||
kDebug() << "Wallet is old, sad panda :(";
|
||||
|
|
Loading…
Add table
Reference in a new issue