diff options
| author | Sadie Powell <sadie@witchery.services> | 2025-03-13 13:37:54 +0000 |
|---|---|---|
| committer | Sadie Powell <sadie@witchery.services> | 2025-03-13 13:37:54 +0000 |
| commit | 31872337833b0afb06f4dede686c29d920d4cbd5 (patch) | |
| tree | d381ba9db250317e1a9b6e26f705ccab96b8f71b | |
| parent | 8b932dc4591172d5dd9afc162ea34de0f9222150 (diff) | |
Fix setting keepbackups to 0 in db_flatfile.
| -rw-r--r-- | modules/database/db_flatfile.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp index 4039e8879..4940fce5b 100644 --- a/modules/database/db_flatfile.cpp +++ b/modules/database/db_flatfile.cpp @@ -145,9 +145,12 @@ class DBFlatFile final continue; } + const auto keepbackups = Config->GetModule(this).Get<unsigned>("keepbackups", "7"); + if (!keepbackups) + continue; + std::error_code ec; std::set<Anope::string> old_backups; - const auto keepbackups = Config->GetModule(this).Get<unsigned>("keepbackups", "7"); for (const auto &entry : std::filesystem::directory_iterator(backupdir.str(), ec)) { Anope::string entryname = entry.path().string(); |
