From b89b91545c29c718d7109c1d2d5ebbf74b5611e5 Mon Sep 17 00:00:00 2001 From: Michael McAndrew Date: Thu, 15 Sep 2016 16:13:12 +0100 Subject: [PATCH] Fix for CRM-19371 --- CRM/Utils/File.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CRM/Utils/File.php b/CRM/Utils/File.php index 485280bd74..268373bad1 100644 --- a/CRM/Utils/File.php +++ b/CRM/Utils/File.php @@ -604,6 +604,9 @@ HTACCESS; // make everything absolute from the baseFilePath $basePath = ($basePath === NULL) ? self::baseFilePath() : $basePath; + // ensure that $basePath has a trailing slash + $basePath = (substr($basePath, -strlen(DIRECTORY_SEPARATOR)) != DIRECTORY_SEPARATOR) ? $basePath . DIRECTORY_SEPARATOR : $basePath; + return $basePath . $directory; } -- 2.25.1