2

I am trying to save (compress) a .zip file using JclCompression with the JCL Demo. When I press the Save button on the Read and Write Tab the demo calls:

procedure TFormMain.ActionSaveExecute(Sender: TObject);
begin
  (FArchive as TJclCompressArchive).Compress;
  CloseArchive;
end;

When (FArchive as TJclCompressArchive).Compress; is executed it produces an exception: "At least one compression volumes could not be replaced after an archive out-of-place update." Also sometimes when I press the save button, the "application is not responding" appears in the form's caption, so I have to shutdown the demo.

Is this code correct or do I have to change it to sucessfully compress and save the zip file? Are there any other demos for JclCompression so I can learn how to use these classes?

Aside from this problem the demo seems to be working correctly. I can open a zip file, create a new zip file, add files, add files from a directory, extract selected files, extract all, and get zip file properties. Saving seems to be a problem.

I am using Delphi 2010 on Windows 7.

Heinrich Ulbricht
  • 10,064
  • 4
  • 54
  • 85
Bill
  • 2,993
  • 5
  • 37
  • 71
  • 1
    When mentioning problems with the JEDI JCL, please quote the exact VERSION you are using of the JCL. – Warren P Nov 07 '11 at 19:55

2 Answers2

2

Same issue as jedi-jcl-compression-library-wont-open-spanned-archive-files. JEDI JCL Compression library wont open spanned archive files

The JCL-JVCL version you use is buggy.
I would recommand to upgrade your JCL installation to latest daily build

Community
  • 1
  • 1
TridenT
  • 4,879
  • 1
  • 32
  • 56
0

I saw this error message when files which I wanted to archive were opened for writing, so you need to close them or copy them to temp folder in advance. Also If you using function Create7zArchive() as i do you need 7z.dll placed in your bin output folder. It's sad, but it seems JCL doesn't use Zlib.pas which is already integrated in Delphi.

JCL 2.7.0.5676 (Stable)

Mic
  • 105
  • 1
  • 6