diff --git a/src/Phing/Task/Ext/Archive/ZipTask.php b/src/Phing/Task/Ext/Archive/ZipTask.php index c1bcddfe5..a43bc98e5 100644 --- a/src/Phing/Task/Ext/Archive/ZipTask.php +++ b/src/Phing/Task/Ext/Archive/ZipTask.php @@ -306,6 +306,9 @@ private function addFilesetsToArchive($zip) if ($f->isDirectory()) { if ($pathInZip != '.') { $zip->addEmptyDir($pathInZip); + $dirAttrName = $pathInZip . '/'; + $dirAttrs = (int) fileperms($f->getPath()) << 16; + $zip->setExternalAttributesName($dirAttrName, \ZipArchive::OPSYS_UNIX, $dirAttrs); } } else { $zip->addFile($f->getAbsolutePath(), $pathInZip);