Debian 10: fix loading ~/.my.cnf with MariaDB
The switch to MariaDB Connector/C 3.0 involves some subtle API changes, including the fact that "~" is not expanded to the user's home directory anymore. This change expands the HOME environment variable within our code base. Change-Id: I30bc0d4fba6f0c8001832a981aa99af7e6f2a369
This commit is contained in:
@ -20,7 +20,7 @@ Database::Database(const std::string &username, const std::string &host, const s
|
|||||||
#endif
|
#endif
|
||||||
CommandLine &cmd = CommandLine::Inst();
|
CommandLine &cmd = CommandLine::Inst();
|
||||||
|
|
||||||
std::string db_conf_file = "~/.my.cnf";
|
std::string db_conf_file = std::string(getenv("HOME")) + "/.my.cnf";
|
||||||
if (cmd[DBDEFAULTS].count()) {
|
if (cmd[DBDEFAULTS].count()) {
|
||||||
db_conf_file = cmd[DBDEFAULTS].first()->arg;
|
db_conf_file = cmd[DBDEFAULTS].first()->arg;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user