From 09066a4b6421757e8abf76f1d48bdf252bd97e87 Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Sat, 9 Jun 2007 01:00:06 +0000 Subject: --- index.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 315b43c8e..b7fdfff1d 100644 --- a/index.php +++ b/index.php @@ -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); } /* -- cgit v1.2.3-24-g4f1b