I have resolved this by reverting back to Packages.controller.php and Packages.subs.php from 1.1 Beta 3 of which the fixed has been forwarded before.
All I can say is something are definitely wrong when certain code are ported to the new PackagesFilterIterator.class.php. That from what I believe is from this part of the 1.1 Beta 3 Packages.controller.php:
if ($package->getFilename() == 'temp'
|| (!($package->isDir() && file_exists($package->getPathname() . '/package-info.xml'))
&& substr(strtolower($package->getFilename()), -7) !== '.tar.gz'
&& strtolower($package->getExtension()) !== 'tgz'
&& strtolower($package->getExtension()) !== 'zip'))
continue;
Something went wrong when that code are converted to this in 1.1 RC 1 PackagesFilterIterator.class.php:
public function accept()
{
$current = $this->current();
$filename = $current->getFilename();
// Skip hidden files and directories.
if ($filename[0] === '.')
{
return false;
}
// The temp directory that may or may not be present.
if ($filename === 'temp')
{
return false;
}
// Anything that, once extracted, doesn't contain a package-info.xml.
if (!($current->isDir()) && file_exists($current->getPathname() . '/package-info.xml'))
{
return false;
}
// And finally, accept anything that has a "package-like" extension.
return
substr(strtolower($filename), -7) == '.tar.gz'
|| substr(strtolower($filename), -4) != '.tgz'
|| substr(strtolower($filename), -4) != '.zip';
I cannot read a code written in advanced ways quite well so I couldn't find fault with it. Those who able to read it, can most probably see its fault.