summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2007-06-09 03:00:06 +0200
committerRick Ellis <rick.ellis@ellislab.com>2007-06-09 03:00:06 +0200
commit09066a4b6421757e8abf76f1d48bdf252bd97e87 (patch)
tree9fb37c4be3198817697d85999f21b28b26017eb0
parent1f852630d606e6bfd7b28dd5f599a29c437d81e8 (diff)
-rw-r--r--index.php14
1 files 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);
}
/*