diff --git a/srcs/libs/init/init.c b/srcs/libs/init/init_runtime.c similarity index 98% rename from srcs/libs/init/init.c rename to srcs/libs/init/init_runtime.c index 3c8b8e9..ab7eb35 100644 --- a/srcs/libs/init/init.c +++ b/srcs/libs/init/init_runtime.c @@ -64,7 +64,7 @@ int user_init(const char *pAppCfgFile, const char *pCfgDirectory, const char *pK strcpy(bufCfgDir, pCfgDirectory); } - if (pAppCfgFile == NULL) { + if (pAppCfgFile == NULL || strlen(pAppCfgFile) == 0) { const char *pTmp = strdup(bufCfgDir); sprintf(bufCfgFile, "%s/%s", pTmp, DEFAULT_CONFIG_FILE); free((void *)pTmp);