normalize_path for base_path
parent
51715f26aa
commit
ed66409220
3
HISTORY
3
HISTORY
|
|
@ -1,4 +1,7 @@
|
||||||
|
|
||||||
|
Version 1.60 2022-08-19
|
||||||
|
* normalize_path for base_path
|
||||||
|
|
||||||
Version 1.59 2022-07-21
|
Version 1.59 2022-07-21
|
||||||
* open file with flag O_CLOEXEC
|
* open file with flag O_CLOEXEC
|
||||||
* add global var g_set_cloexec and macro FC_SET_CLOEXEC
|
* add global var g_set_cloexec and macro FC_SET_CLOEXEC
|
||||||
|
|
|
||||||
|
|
@ -294,7 +294,7 @@ int get_base_path_from_conf_file(const char *filename, char *base_path,
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
pBasePath = iniGetStrValue(NULL, "base_path", &iniContext);
|
pBasePath = iniGetStrValue(NULL, "base_path", &iniContext);
|
||||||
if (pBasePath == NULL)
|
if (pBasePath == NULL || *pBasePath == '\0')
|
||||||
{
|
{
|
||||||
logError("file: "__FILE__", line: %d, " \
|
logError("file: "__FILE__", line: %d, " \
|
||||||
"conf file \"%s\" must have item " \
|
"conf file \"%s\" must have item " \
|
||||||
|
|
@ -303,7 +303,7 @@ int get_base_path_from_conf_file(const char *filename, char *base_path,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(base_path, path_size, "%s", pBasePath);
|
normalize_path(NULL, pBasePath, base_path, path_size);
|
||||||
chopPath(base_path);
|
chopPath(base_path);
|
||||||
if (!fileExists(base_path))
|
if (!fileExists(base_path))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue