fclose(fp);
}
- if (conf_path && conf_path[0]) {
+ if (conf_path && conf_path[0] && (access(conf_path, F_OK) == 0)) {
ret = system_info_get_values_config_xml(db_path, conf_path);
if (ret < 0)
_E("Failed to get keys and values from xml(%d)", ret);
}
- if (release_path && release_path[0]) {
+ if (release_path && release_path[0] && (access(release_path, F_OK) == 0)) {
ret = system_info_get_values_ini(db_path, release_path);
if (ret < 0)
_E("Failed to get keys and values from ini(%d)", ret);
}
if (conf_path[0] != '\0' && db_path[0] != '\0') {
- printf("Make system info db(%s) by %s and %s\n", db_path, conf_path, release_path);
+ if (release_path[0])
+ printf("Make system info db(%s) by %s and %s\n", db_path, conf_path, release_path);
+ else
+ printf("Make system info db(%s) by %s\n", db_path, conf_path);
return system_info_create_db(conf_path, release_path, db_path);
}