mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-13 13:07:06 +00:00
fix file_path issues
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6546 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
3e439b248f
commit
5098f7a174
5 files changed
+8
-8
No files matched your search
+2
-2
@@ -38,7 +38,7 @@ SWITCH_DECLARE(int) switch_config_open_file(switch_config_t * cfg, char *file_pa
|
||||
char *path = NULL;
|
||||
char path_buf[1024];
|
||||
|
||||
if (file_path[0] == '/') {
|
||||
if (switch_is_file_path(file_path)) {
|
||||
path = file_path;
|
||||
} else {
|
||||
snprintf(path_buf, sizeof(path_buf), "%s%s%s", SWITCH_GLOBAL_dirs.conf_dir, SWITCH_PATH_SEPARATOR, file_path);
|
||||
@@ -53,7 +53,7 @@ SWITCH_DECLARE(int) switch_config_open_file(switch_config_t * cfg, char *file_pa
|
||||
cfg->lockto = -1;
|
||||
|
||||
if (!(f = fopen(path, "r"))) {
|
||||
if (file_path[0] != '/') {
|
||||
if (!switch_is_file_path(file_path)) {
|
||||
int last = -1;
|
||||
char *var, *val;
|
||||
|
||||
|
||||
Reference in new issue
Block a user