From 5f22f5242e5f6bf1a2260f26d778dd710ca49948 Mon Sep 17 00:00:00 2001 From: Sascha Greuel Date: Sun, 4 Aug 2013 14:11:02 +0200 Subject: [PATCH] Added support for directory date --- wcfsetup/install/files/lib/system/io/ZipWriter.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/system/io/ZipWriter.class.php b/wcfsetup/install/files/lib/system/io/ZipWriter.class.php index 4a74bb95de..ef6ba74dc2 100644 --- a/wcfsetup/install/files/lib/system/io/ZipWriter.class.php +++ b/wcfsetup/install/files/lib/system/io/ZipWriter.class.php @@ -24,7 +24,7 @@ class ZipWriter { * * @param string $name dirname */ - public function addDir($name) { + public function addDir($name, $date = TIME_NOW) { // replace backward slashes with forward slashes in the dirname $name = StringUtil::replace("\\", "/", $name); $name = FileUtil::addTrailingSlash($name); @@ -56,7 +56,8 @@ class ZipWriter { $record = "\x50\x4b\x01\x02"; $record .= "\x00\x00\x0a\x00"; $record .= "\x00\x00\x00\x00"; - $record .= "\x00\x00\x00\x00"; + //$record .= "\x00\x00\x00\x00"; + $record .= (intval($date) < 315532800 ? "\x00\x00\x00\x00" : $this->getDosDatetime($date)); $record .= pack("V", 0); $record .= pack("V", 0); $record .= pack("V", 0); -- 2.20.1