fix: add ctx data dir check for database initialization
This commit is contained in:
parent
9aefa2ebf9
commit
16cfc0676e
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-07-14 18:02+0300\n"
|
||||
"POT-Creation-Date: 2024-07-14 21:05+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -9,6 +9,11 @@ bool lm_ctx_database_init(lm_ctx_t *ctx){
|
||||
if(ctx->db != NULL)
|
||||
return true;
|
||||
|
||||
if(NULL == ctx->data){
|
||||
lm_error_set(LM_ERR_CtxDataNULL);
|
||||
return false;
|
||||
}
|
||||
|
||||
char dbpath[strlen(ctx->data)+10];
|
||||
join(dbpath, ctx->data, "db");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user