diff --git a/src/cli/Remove.cpp b/src/cli/Remove.cpp index f383d1636..906a81410 100644 --- a/src/cli/Remove.cpp +++ b/src/cli/Remove.cpp @@ -35,7 +35,7 @@ int Remove::executeWithDatabase(QSharedPointer database, QSharedPointe auto& out = parser->isSet(Command::QuietOption) ? Utils::DEVNULL : Utils::STDOUT; auto& err = Utils::STDERR; - auto& entryPath = parser->positionalArguments().at(1); + auto entryPath = parser->positionalArguments().at(1); QPointer entry = database->rootGroup()->findEntryByPath(entryPath); if (!entry) { err << QObject::tr("Entry %1 not found.").arg(entryPath) << endl; @@ -50,7 +50,7 @@ int Remove::executeWithDatabase(QSharedPointer database, QSharedPointe recycled = false; } else { database->recycleEntry(entry); - }; + } QString errorMessage; if (!database->save(Database::Atomic, {}, &errorMessage)) {