浏览代码

Merge pull request #5993 from stefangr/fix_bitbucket_dist_install_from_private_repo

Fix dist downloads from bitbucket private repos
Jordi Boggiano 8 年之前
父节点
当前提交
37bbf1a7c9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Util/RemoteFilesystem.php

+ 1 - 1
src/Composer/Util/RemoteFilesystem.php

@@ -1008,7 +1008,7 @@ class RemoteFilesystem
         // Path for a public download follows this pattern /{user}/{repo}/downloads/{whatever}
         // {@link https://blog.bitbucket.org/2009/04/12/new-feature-downloads/}
         $pathParts = explode('/', $path);
-        if (count($pathParts) >= 4 && $pathParts[2] != 'downloads') {
+        if (count($pathParts) >= 4 && $pathParts[3] == 'downloads') {
             return true;
         }