From 81820beefc32428a6904d6a8703fc0ef881629cd Mon Sep 17 00:00:00 2001 From: Dimitrios Kanellopoulos Date: Sat, 16 Nov 2013 19:34:06 +0100 Subject: [PATCH] Cache path never ends with '/' --- src/Composer/Command/SelfUpdateCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Command/SelfUpdateCommand.php b/src/Composer/Command/SelfUpdateCommand.php index e8c373197..4074d8bad 100644 --- a/src/Composer/Command/SelfUpdateCommand.php +++ b/src/Composer/Command/SelfUpdateCommand.php @@ -49,8 +49,8 @@ EOT $localFilename = realpath($_SERVER['argv'][0]) ?: $_SERVER['argv'][0]; // Check if current dir is writable and if not try the cache dir from settings - $tmpDir = is_writable(dirname($localFilename))? dirname($localFilename) . '/' : $cacheDir; - $tempFilename = $tmpDir . basename($localFilename, '.phar').'-temp.phar'; + $tmpDir = is_writable(dirname($localFilename))? dirname($localFilename) : $cacheDir; + $tempFilename = $tmpDir . '/' . basename($localFilename, '.phar').'-temp.phar'; // check for permissions in local filesystem before start connection process if (!is_writable($tmpDir)) {