From 3b1c54fa719cacb8f7ebd32bd4871fa226a2d737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Wed, 18 Sep 2019 13:34:20 -0400 Subject: [PATCH] jamiaccount: set archivePath_ and archiveHasPassword_ Change-Id: I86175668235a4c2c263dd677534e40663c62a54e Gitlab: #156 --- src/jamidht/jamiaccount.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp index 91b831694e..37f925bfe9 100644 --- a/src/jamidht/jamiaccount.cpp +++ b/src/jamidht/jamiaccount.cpp @@ -973,7 +973,10 @@ JamiAccount::loadAccount(const std::string& archive_password, const std::string& std::unique_ptr<AccountManager::AccountCredentials> creds; if (managerUri_.empty()) { auto acreds = std::make_unique<ArchiveAccountManager::ArchiveAccountCredentials>(); - acreds->archivePath = archivePath_.empty() ? "archive.gz" : archivePath_; + if (archivePath_.empty()) { + archivePath_ = "archive.gz"; + } + acreds->archivePath = archivePath_; if (not archive_path.empty()) { acreds->scheme = "file"; acreds->uri = archive_path; @@ -991,6 +994,7 @@ JamiAccount::loadAccount(const std::string& archive_password, const std::string& creds = std::move(screds); } creds->password = archive_password; + archiveHasPassword_ = !archive_password.empty(); accountManager_->initAuthentication( std::move(fReq), -- GitLab