commit
42920e01d4
|
@ -92,7 +92,7 @@ class Zip
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle archives which do not have a TOC record for the directory itself
|
// handle archives which do not have a TOC record for the directory itself
|
||||||
if (false === strpos('\\', $dirname) && false === strpos('/', $dirname)) {
|
if (false === strpos($dirname, '\\') && false === strpos($dirname, '/')) {
|
||||||
$topLevelPaths[$dirname.'/'] = true;
|
$topLevelPaths[$dirname.'/'] = true;
|
||||||
if (\count($topLevelPaths) > 1) {
|
if (\count($topLevelPaths) > 1) {
|
||||||
throw new \RuntimeException('Archive has more than one top level directories, and no composer.json was found on the top level, so it\'s an invalid archive. Top level paths found were: '.implode(',', array_keys($topLevelPaths)));
|
throw new \RuntimeException('Archive has more than one top level directories, and no composer.json was found on the top level, so it\'s an invalid archive. Top level paths found were: '.implode(',', array_keys($topLevelPaths)));
|
||||||
|
|
Loading…
Reference in New Issue