diff --git a/src/Composer/Util/RemoteFilesystem.php b/src/Composer/Util/RemoteFilesystem.php index f482c91b9..5b137686d 100644 --- a/src/Composer/Util/RemoteFilesystem.php +++ b/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; }