From 3c712fe63f77a493f284910454ff1c830b752cb0 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Fri, 26 Sep 2014 13:44:40 -0400 Subject: [PATCH] CRM-15365 - Prevent adding a double trailing slash --- CRM/Utils/File.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Utils/File.php b/CRM/Utils/File.php index 579a7d0b38..d8a41f0904 100644 --- a/CRM/Utils/File.php +++ b/CRM/Utils/File.php @@ -258,7 +258,7 @@ class CRM_Utils_File { $separator = DIRECTORY_SEPARATOR; } - if (substr($name, -1, 1) != $separator) { + if (!in_array(substr($name, -1, 1), array('/', '\\'))) { $name .= $separator; } return $name; -- 2.25.1