mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-12-31 00:01:07 -05:00
Move unlockDatabase to CLI/Utils (#2539)
Move unlockDatabase from Database to to cli/Utils
This commit is contained in:
parent
b6eeabab5e
commit
cb3c4893dc
13 changed files with 83 additions and 77 deletions
|
|
@ -68,17 +68,17 @@ int Merge::execute(const QStringList& arguments)
|
|||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
auto db1 = Database::unlockFromStdin(args.at(0),
|
||||
parser.value(Command::KeyFileOption),
|
||||
parser.isSet(Command::QuietOption) ? Utils::DEVNULL : Utils::STDOUT,
|
||||
Utils::STDERR);
|
||||
auto db1 = Utils::unlockDatabase(args.at(0),
|
||||
parser.value(Command::KeyFileOption),
|
||||
parser.isSet(Command::QuietOption) ? Utils::DEVNULL : Utils::STDOUT,
|
||||
Utils::STDERR);
|
||||
if (!db1) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
QSharedPointer<Database> db2;
|
||||
if (!parser.isSet("same-credentials")) {
|
||||
db2 = Database::unlockFromStdin(args.at(1), parser.value(keyFileFromOption), Utils::STDOUT, Utils::STDERR);
|
||||
db2 = Utils::unlockDatabase(args.at(1), parser.value(keyFileFromOption), Utils::STDOUT, Utils::STDERR);
|
||||
} else {
|
||||
db2 = QSharedPointer<Database>::create();
|
||||
QString errorMessage;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue