From 247d1aca41d575a3ca1096835cfdbef0fd511c48 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 18 Oct 2012 09:40:35 +0200 Subject: [PATCH] Avoid double slashes if HOME ends with a slash, fixes #1227 --- src/Composer/Factory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Composer/Factory.php b/src/Composer/Factory.php index 685f62364..64689833f 100644 --- a/src/Composer/Factory.php +++ b/src/Composer/Factory.php @@ -38,7 +38,7 @@ class Factory if (defined('PHP_WINDOWS_VERSION_MAJOR')) { $home = getenv('APPDATA') . '/Composer'; } else { - $home = getenv('HOME') . '/.composer'; + $home = rtrim(getenv('HOME'), '/') . '/.composer'; } }