diff options
-rw-r--r-- | index.php | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -58,11 +58,21 @@ | | Let's attempt to determine the full-server path to the "system" | folder in order to reduce the possibility of path problems. +| Note: We only attempt this if the user hasn't specified a +| full server path. | */ -if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) +if (strpos($system_folder, '/') === FALSE) { - $system_folder = str_replace("\\", "/", realpath(dirname(__FILE__))).'/'.$system_folder; + if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE) + { + $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder; + } +} +else +{ + // Swap directory separators to Unix style for consistency + $system_folder = str_replace("\\", "/", $system_folder); } /* |