Skip to content

Commit

Permalink
Code format - (Clang-format)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Dec 13, 2024
1 parent 1976937 commit 8967797
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/database/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ void Database::createDatabaseBackup(bool compress) const {
// Delete backups older than 7 days
auto nowTime = std::chrono::system_clock::now();
auto sevenDaysAgo = nowTime - std::chrono::hours(7 * 24); // 7 days in hours
for (const auto& entry : std::filesystem::directory_iterator("database_backup")) {
for (const auto &entry : std::filesystem::directory_iterator("database_backup")) {
if (entry.is_directory()) {
try {
for (const auto& file : std::filesystem::directory_iterator(entry)) {
for (const auto &file : std::filesystem::directory_iterator(entry)) {
if (file.path().extension() == ".gz") {
auto fileTime = std::filesystem::last_write_time(file);
auto fileTimeSystemClock = std::chrono::clock_cast<std::chrono::system_clock>(fileTime);
Expand All @@ -150,7 +150,7 @@ void Database::createDatabaseBackup(bool compress) const {
}
}
}
} catch (const std::filesystem::filesystem_error& e) {
} catch (const std::filesystem::filesystem_error &e) {
g_logger().error("Failed to check or delete files in backup directory: {}. Error: {}", entry.path().string(), e.what());
}
}
Expand Down

0 comments on commit 8967797

Please sign in to comment.