Skip to content

Commit

Permalink
ZipArchiver: Try to force setting permissions, however does not seem …
Browse files Browse the repository at this point in the history
…to do a differance
  • Loading branch information
andrerom committed Apr 17, 2019
1 parent bcd256c commit 8ad090a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Composer/Factory.php
Expand Up @@ -511,7 +511,7 @@ public function createArchiveManager(Config $config, Downloader\DownloadManager

$am = new Archiver\ArchiveManager($dm);
$am->addArchiver(new Archiver\ZipArchiver);
$am->addArchiver(new Archiver\PharArchiver);
//$am->addArchiver(new Archiver\PharArchiver);

return $am;
}
Expand Down
2 changes: 2 additions & 0 deletions src/Composer/Package/Archiver/ZipArchiver.php
Expand Up @@ -44,6 +44,8 @@ public function archive($sources, $target, $format, array $excludes = array(), $
$zip->addEmptyDir($localname);
} else {
$zip->addFile($filepath, $localname);
$perms = fileperms($filepath);
$zip->setExternalAttributesName($filepath, ZipArchive::OPSYS_UNIX, $perms << 16);
}
}
if ($zip->close()) {
Expand Down

0 comments on commit 8ad090a

Please sign in to comment.