CkZipEntry::ReplaceString() returns true but the zip file entry is missing from the zip file afterwards. This worked fine in 9.4.0 before upgrading to 9.4.1 SP1.
Code to reproduce:
zip.OpenZip(pszPath); shared_ptr<CkZipEntry> zipentry(zip.GetEntryByName(_T("docProps/custom.xml"))); CString csXml(zipentry->unzipToString(0, _T("utf-8"))); ... zipentry->ReplaceString((LPCTSTR)csXml, _T("utf-8")); zip.WriteZipAndClose();
ChilkatLog: WriteZipAndClose: DllDate: Aug 16 2013 ChilkatVersion: 18.104.22.168 UnlockPrefix: xxxx Username: xxxx Architecture: Little Endian; 32-bit Language: Visual C++ 11.0 VerboseLogging: 1 targetZipPath: D:\LAN test\010208.433.docx openedZipPath: D:\LAN test\010208.433.docx File already exists at target zip path. Will first write to temp file, then if successful, will delete existing zip and move new zip into its place. tempDir_ifNeeded: C:\Users\xxxx\AppData\Local\Temp\xxxx\Docx\ tempZipPath: C:\Users\xxxx\AppData\Local\Temp\xxxx\Docx\ckz_OA6G.tmp writeZipToOutput: oemCodePage: 850 encryption: 0 passwordProtected: 0 totalSize64: 143368 numEntries: 24 writeLfhAndData: Zip entry has null filename. --writeLfhAndData failedEntry: ---------------------------- Writing central directory... ---------------------------- numCentralDirRecords: 23 Finished writing zip --writeZipToOutput moveFromTempZipToTarget: Moving just-created temp zip to target... tempZipPath: C:\Users\xxxx\AppData\Local\Temp\xxxx\Docx\ckz_OA6G.tmp targetZipPath: D:\LAN test\010208.433.docx A file already exists at the target path. Deleting... Already-existing target zip deleted. Moving temp zip to target zip... Successfully moved temp zip to target zip. --moveFromTempZipToTarget Success. --WriteZipAndClose --ChilkatLog
Thanks! I'm working on the problem.
The problem should be fixed. Here are new VC++ 11.0 builds with the fix:
Sorry for the delay. Here are the new builds for VC++ 2012 v110_xp
Yes, I understand. The Chilkat blog has a pre-release category here:
It may always be a few fixes behind, mainly because I'm not going to post the fix until it's been thoroughly tested.
The v9.4.1 SP1 release also lists many of the fixes http://www.cknotes.com/?p=487
It's impossible to produce pre-release builds for all supported programming languages, operating systems, etc. It would take too much time. Therefore, if a pre-release is needed, it can be build and supplied upon request. It will only be possible to provide a pre-release at the latest version.