Hi, I am trying to open a zip file with CkZip on windows. The zip file path has a whitespace in it. Which format is expected by CkZip for whitespaces in windows? Should the whitespaces be escaped?
CkZip zipModule; bool success = zipModule.UnlockComponent(CHILKAT_KEY); success = zipModule.OpenZip("c:/test/filename with space.zip");
EDIT: it appears the actual error is caused by another reason. I think it is related to some SFX flag in the zip files that cause the failure. All files with SFX flag set to true failed to extract.
Here's the last error log:
OpenZip: DllDate: Nov 13 2016 ChilkatVersion: 126.96.36.199 UnlockPrefix: XXXXXXXXX Architecture: Little Endian; 32-bit Language: Linux C/C++ VerboseLogging: 0 Component successfully unlocked using purchased unlock code. openZip: zipPath: XXXXX.zip oemCodePage: 65001 openFromMemData: numCentralDirEntries: 8 szCentralDir: 527 posCentralDir: 8447 Did not find central file header signature. index: 0 filePos: 8447 --openFromMemData --openZip Failed. --OpenZip --ChilkatLog
I tried opening a Zip with spaces in file names without issue (even tried forward slashes like you did and that seems to work even though Windows typically takes backslashes as path separators).
Did you get an error? If so, please post the complete contents of the LastErrorText property immediately after calling the OpenZip method.
SFX isn't a flag - it's a self extracting executable file. It may include ZIPped components, or it may even use a different compression algorithm. Essentially, it's not really a ZIP file, so I don't think you can expect it to be opened/unzipped by the Chilkat library.
See this for more info: http://cknotes.com/about-self-extracting-exes/