Fix for incorrent errors about non-empty output directory

This commit is contained in:
wapmorgan 2015-05-26 04:55:20 +03:00
parent f8cf01dd43
commit 0dc9ace168

View file

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