Merge pull request #7 from wapmorgan/master

Fix for incorrent errors about non-empty output directory
This commit is contained in:
Walter Dal Mut 2015-05-26 08:35:35 +02:00
commit 101c0f7cd6

View file

@ -108,7 +108,7 @@ class Packager
if (file_exists($this->getOutputPath())) {
$iterator = new \DirectoryIterator($this->getOutputPath());
foreach ($iterator as $path) {
if ($path != '.' || $path != '..') {
if ($path != '.' && $path != '..') {
echo "OUTPUT DIRECTORY MUST BE EMPTY! Something exists, exit immediately!" . PHP_EOL;
exit();
}