From f130f9116e1e9ee9735d8026aa5242fc9daceecb Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Fri, 07 Feb 2014 08:45:25 -0500
Subject: [PATCH] Fix directories check in Installer on Windows (#1489576) Added rcube_utils::is_absolute_path() method
---
program/lib/Roundcube/rcube_config.php | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/program/lib/Roundcube/rcube_config.php b/program/lib/Roundcube/rcube_config.php
index 0352e47..afe13e8 100644
--- a/program/lib/Roundcube/rcube_config.php
+++ b/program/lib/Roundcube/rcube_config.php
@@ -63,7 +63,7 @@
$this->paths = explode(PATH_SEPARATOR, $paths);
// make all paths absolute
foreach ($this->paths as $i => $path) {
- if (!$this->_is_absolute($path)) {
+ if (!rcube_utils::is_absolute_path($path)) {
if ($realpath = realpath(RCUBE_INSTALL_PATH . $path)) {
$this->paths[$i] = unslashify($realpath) . '/';
}
@@ -243,8 +243,8 @@
*/
public function resolve_paths($file, $use_env = true)
{
- $files = array();
- $abs_path = $this->_is_absolute($file);
+ $files = array();
+ $abs_path = rcube_utils::is_absolute_path($file);
foreach ($this->paths as $basepath) {
$realpath = $abs_path ? $file : realpath($basepath . '/' . $file);
@@ -267,14 +267,6 @@
}
return $files;
- }
-
- /**
- * Determine whether the given file path is absolute or relative
- */
- private function _is_absolute($path)
- {
- return $path[0] == DIRECTORY_SEPARATOR || preg_match('!^[a-z]:[\\\\/]!i', $path);
}
/**
--
Gitblit v1.9.1