Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Replace "s3gw.db" with DB_FILENAME constant
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Serong <[email protected]>
  • Loading branch information
tserong committed Nov 15, 2023
1 parent b94dfd9 commit 0fa6695
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/checks.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

#include "sqlite.h"

constexpr std::string_view DB_FILENAME = "s3gw.db";

/* Fix - This is an abstract datatype representing an executable action to fix
* an incosistency in the filesystem or metadata database.
*/
Expand Down Expand Up @@ -51,7 +53,7 @@ class Check {
: check_name(name),
fatality(f),
root_path(path),
metadata(std::make_unique<Database>(path / "s3gw.db")) {}
metadata(std::make_unique<Database>(path / DB_FILENAME)) {}
virtual ~Check(){};
enum LogLevel { SILENT, NORMAL, VERBOSE };
bool check(LogLevel log_level = NORMAL);
Expand Down
4 changes: 1 addition & 3 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ int main(int argc, char* argv[]) {

std::string path_str(options_map["path"].as<std::string>());
std::filesystem::path path_root(path_str);
std::filesystem::path path_database = path_root / "s3gw.db";
std::filesystem::path path_database_shm = path_root / "s3gw.db_tmp-shm";
std::filesystem::path path_database_wal = path_root / "s3gw.db-wal";
std::filesystem::path path_database = path_root / DB_FILENAME;

FSCK_ASSERT(std::filesystem::exists(path_root), "Path not found");
FSCK_ASSERT(
Expand Down

0 comments on commit 0fa6695

Please sign in to comment.