[Zip-devel] Error fails CRC check

William P. Proffitt jacobite1607 at gmail.com
Thu Feb 12 14:47:12 UTC 2015


Hello,

I am using your library to create a zip file containing PDF(s). In each  
case the end result is a zip file that looks right, including file size  
reported inside the zip file, but if I try to extract the PDF I get the  
dreaded "File fails CRC check....." am I doing something wrong?

(zip:with-output-to-zipfile
   (zip "Myzipfile.zip" :if-exists :new-version)
      (dolist (SelectedFileName '("c:\\temp\\MyAdobe1.pdf"  
"g:\\anotherdirectory\\MyAdobe2.pdf"  
"g:\\yetanotherdirectory\\mytextfile.txt")
        (with-open-file (TheFile SelectedFileName :element-type  
'(unsigned-byte 8))
          (zip:write-zipentry
            zip
            (PathStripper SelectedFileName)
          TheFile))



(defun PathStripper(FileToProcess)
        (loop while (search "\\" FileToProcess) do (setf FileToProcess  
(subseq FileToProcess 1)))
        FileToProcess)

-- 
Regards,

William
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/zip-devel/attachments/20150212/36061ac9/attachment.html>


More information about the zip-devel mailing list