浏览代码

Cache path never ends with '/'

Dimitrios Kanellopoulos 11 年之前
父节点
当前提交
81820beefc
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/Composer/Command/SelfUpdateCommand.php

+ 2 - 2
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)) {