1
0
mirror of https://github.com/Ne-Lexa/php-zip.git synced 2025-10-13 06:14:37 +02:00

fix incorrect time in archive

This commit is contained in:
Ne-Lexa
2017-03-15 19:03:04 +03:00
parent 67fc1ea7ad
commit 1b065c4cca
8 changed files with 94 additions and 52 deletions

View File

@@ -461,6 +461,9 @@ class ZipFile implements \Countable, \ArrayAccess, \Iterator
$localName = basename($filename);
}
$this->addFromStream($handle, $localName, $compressionMethod);
$this->centralDirectory
->getModifiedEntry($localName)
->setTime(filemtime($filename));
return $this;
}