create backup only when receiver found

This commit is contained in:
2026-04-25 10:46:20 +03:00
parent a2e874de85
commit 22b669fae0
6 changed files with 40 additions and 41 deletions
+1
View File
@@ -176,6 +176,7 @@ std::tuple<bool, Result, std::string> io::backup(size_t index, AccountUid uid)
std::string suggestion = StringUtils::removeNotAscii(StringUtils::removeAccents(Account::username(title.userId())));
io::createDirectory(title.path());
std::string dstPath = title.path() + "/" + suggestion;
// Write to a temp dir first; rename on success so the existing backup