blob: a3884269867247743ec86523fd7d42b8bbf11459 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
diff --git a/src/core/tc_log.c b/src/core/tc_log.c
index 472587d..dad2537 100644
--- a/src/core/tc_log.c
+++ b/src/core/tc_log.c
@@ -69,6 +69,12 @@ tc_log_init(const char *file)
return -1;
}
strncpy(default_file_path, TC_PREFIX, len);
+
+ /* absolute path */
+ if ('/' == TC_ERROR_LOG_PATH[0]) {
+ len = 0;
+ }
+
p = default_file_path + len;
len += strlen(TC_ERROR_LOG_PATH);
if (len >= 256) {
|