summaryrefslogtreecommitdiffstats
path: root/system/core/Log.php
diff options
context:
space:
mode:
authorvlakoff <vlakoff@gmail.com>2017-02-07 11:01:55 +0100
committervlakoff <vlakoff@gmail.com>2017-02-07 14:57:33 +0100
commitd107d6d950b38b46fba58488c201d5cac35be156 (patch)
tree41e10b6050763d280e0b3edb9b1c312ec96e1d9d /system/core/Log.php
parent8128e61ae620804fec1ed64b377abf95f1bab297 (diff)
Allow to omit trailing slash in config paths
Diffstat (limited to 'system/core/Log.php')
-rw-r--r--system/core/Log.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/system/core/Log.php b/system/core/Log.php
index 5be7baea8..67b315b6b 100644
--- a/system/core/Log.php
+++ b/system/core/Log.php
@@ -124,7 +124,9 @@ class CI_Log {
isset(self::$func_override) OR self::$func_override = (extension_loaded('mbstring') && ini_get('mbstring.func_override'));
- $this->_log_path = ($config['log_path'] !== '') ? $config['log_path'] : APPPATH.'logs/';
+ $this->_log_path = ($config['log_path'] !== '')
+ ? rtrim($config['log_path'], '/\\').DIRECTORY_SEPARATOR : APPPATH.'logs'.DIRECTORY_SEPARATOR;
+
$this->_file_ext = (isset($config['log_file_extension']) && $config['log_file_extension'] !== '')
? ltrim($config['log_file_extension'], '.') : 'php';