From 76bbbcf5deffb2d526502a807d27bbbfb90b7f12 Mon Sep 17 00:00:00 2001 From: pabs Date: Thu, 23 Oct 2008 14:58:32 -0400 Subject: add workaround for windows archive viewer bug (fixes #34) --- zipstream.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'zipstream.php') diff --git a/zipstream.php b/zipstream.php index 1fe72dd..14d728f 100644 --- a/zipstream.php +++ b/zipstream.php @@ -281,6 +281,11 @@ class ZipStream { # Create and send zip header for this file. # function add_file_header($name, $opt, $meth, $crc, $zlen, $len) { + # strip leading slash from file name + # (fixes bug in windows archive viewer) + if ($name[0] == '/') + $name = substr($name, 1); + # calculate name length $nlen = strlen($name); -- cgit v1.2.3