0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

ircd::fs: Generalize DBPATH.

This commit is contained in:
Jason Volk 2016-09-23 18:21:08 -07:00
parent b373081646
commit 0913873b30
3 changed files with 6 additions and 3 deletions

View file

@ -68,7 +68,7 @@ rsdb_init(rsdb_error_cb * ecb)
if(bandb_dbpath_env != NULL)
rb_strlcpy(dbpath, bandb_dbpath_env, sizeof(dbpath));
else
rb_strlcpy(dbpath, ircd::path::DBPATH, sizeof(dbpath));
rb_strlcpy(dbpath, ircd::path::BDBPATH, sizeof(dbpath));
if(sqlite3_open(dbpath, &rb_bandb) != SQLITE_OK)
{

View file

@ -58,7 +58,8 @@ constexpr auto CPATH = RB_ETC_DIR "/ircd.conf"; // ircd.conf file
constexpr auto MPATH = RB_ETC_DIR "/ircd.motd"; // MOTD file
constexpr auto LPATH = RB_LOG_DIR "/ircd.log"; // ircd logfile
constexpr auto OPATH = RB_ETC_DIR "/opers.motd"; // oper MOTD file
constexpr auto DBPATH = PKGLOCALSTATEDIR "/ban.db"; // bandb file
constexpr auto DBPATH = PKGLOCALSTATEDIR; // database prefix
constexpr auto BDBPATH = PKGLOCALSTATEDIR "/ban.db"; // bandb file
// Below are the elements for default paths.
enum index
@ -77,6 +78,7 @@ enum index
IRCD_LOG,
IRCD_OMOTD,
BANDB,
DB,
_NUM_
};

View file

@ -53,7 +53,8 @@ std::array<ent, num_of<index>()> paths
{ "ircd.motd", MPATH },
{ "ircd.log", LPATH },
{ "oper motd", OPATH },
{ "bandb", DBPATH },
{ "bandb", BDBPATH },
{ "db", DBPATH },
}};
} // namespace path