Chilkat Email Components Home

Windows XP built-in Zip Bug

Back

Question - The zip file a create opens great in WinZip, but is "blocked" when I try to extract it using the windows XP decompression tool. (right click on the zip, click open with compressed (zipped) folders). I believe the problem stems from the fact that the current directory is included in AppendFiles:
zip.AppendFiles("./Tree/*",true,0);
When the / part is removed it works just fine... any ideas why?

Answer:
The Windows XP built-in Zip support cannot handle files within a Zip with paths beginning with "./".

Yes, I see the same behavior. My feeling is that this is a bug in the Windows XP decompression tool. One possible action is for Chilkat to automatically eliminate the "./" if the string passed to AppendFiles begins with it. However, I'd prefer to not do this just in case customers (for some unknown reason) desire that the "./" be present in the Zip. My suggestion is to write a few lines of code to check your input string to AppendFiles. If it begins with "./", eliminate the 1st two characters from the string.

There is no source code associated with this article.