1
0
Fork 0

Make sure Phar overwrites files and doesn't load them

pull/1567/head
Nils Adermann 2013-03-28 13:24:34 +01:00
parent 4af69c85ca
commit 8803281648
1 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,11 @@ class PharArchiver implements ArchiverInterface
{
$sources = realpath($sources);
// Phar would otherwise load the file which we don't want
if (file_exists($target)) {
unlink($target);
}
try {
$phar = new \PharData($target, null, null, static::$formats[$format]);
$files = new ArchivableFilesFinder($sources, $excludes);