mirror of
https://github.com/Ne-Lexa/php-zip.git
synced 2025-10-27 03:51:35 +01:00
fix incorrect time in archive
This commit is contained in:
@@ -166,6 +166,18 @@ class CentralDirectory
|
||||
return $this->entries[$entryName];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $entryName
|
||||
* @return ZipEntry
|
||||
* @throws ZipNotFoundEntry
|
||||
*/
|
||||
public function getModifiedEntry($entryName){
|
||||
if (!isset($this->modifiedEntries[$entryName])) {
|
||||
throw new ZipNotFoundEntry('Zip modified entry ' . $entryName . ' not found');
|
||||
}
|
||||
return $this->modifiedEntries[$entryName];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return EndOfCentralDirectory
|
||||
*/
|
||||
@@ -420,7 +432,7 @@ class CentralDirectory
|
||||
// compression method 2 bytes
|
||||
$entry->getMethod(),
|
||||
// last mod file datetime 4 bytes
|
||||
$entry->getTime(),
|
||||
$entry->getDosTime(),
|
||||
// crc-32 4 bytes
|
||||
$entry->getCrc(),
|
||||
// compressed size 4 bytes
|
||||
|
||||
Reference in New Issue
Block a user