|
Post by Heiko Schrder on Feb 26, 2004 17:28:48 GMT -5
Hi, I'm a registered user of the VCLZip Pro version and I want to use the following code to unzip one file:
--snip---
With Zip do begin // Zip: TVCLUnzip FilesList.Clear; DestDir := OEBTempDir;
ZipName := ProgPath + BackupList.Items.Strings[BackupList.ItemIndex] + ZipEndung; //e.g. C:\eigene dateien\Hauptidentität_2004-02-09_11-16-58.oeb
DoAll := False; OverwriteMode := Always; KeepZipOpen := true; Password := PassPhrase; end;
Zip.FilesList.Add('realname.tmp'); Zip.Unzip;
--snip---
The ZipName and the DestDir are correct. If the VCLZip has to Unzip the one file I get the error message in german "Ungültige Gleitkommaoperation" (invalid floating point operation). What's wrong? I hope anybody can help me, I'm despair. The error appears on VCLUnZip.pas in line 2088
Here are the special informations from EurekaLog. EurekaLog is an add-in tool that gives to your application (GUI, Console, Web, etc.) the ability to catch every exception (even those raised by memory leaks) and generates a detailed log of call stack (with unit, class, method and line # - like the below image), showing and sending it back to you via email.
---------------------------------------------------------------------- Application... Start Date : 02/26/2004 23:03:50 Name/Description: Sicherung von Outlook-Express-Daten Version Number : 2.10.31.185
Exception... Date : 02/26/2004 23:04:02 Address: 0040A85D Module : OEBACKUP.EXE Type : EInvalidOp Message: Ungültige Gleitkommaoperation.
Active Controls... Form Class : TWizard2Dlg Form Text : OEBackup : Backup einspielen Control Class: TButton Control Text : &Weiter >
Computer... Name : AGE-ME Total Memory: 255 Mb Free Memory : 118 Mb Total Disk : 27,94 Gb Free Disk : 7,65 Gb
Operating System... Type : Microsoft Winsows ME Build # : 3000 Language: Deutsch (Standard)
---------------------------------------------------------------------- |Address |Module |Unit |Class |Procedure/Method|Line| ---------------------------------------------------------------------- |004B9C36|OEBACKUP.EXE|VCLUnZip.pas|TVCLUnZip |GetFileInfo |2088| |004B9BE8|OEBACKUP.EXE|VCLUnZip.pas|TVCLUnZip |GetFileInfo |2083| |004B9256|OEBACKUP.EXE|VCLUnZip.pas|TVCLUnZip |OpenZip |1796| |004B9214|OEBACKUP.EXE|VCLUnZip.pas|TVCLUnZip |OpenZip |1778| |004B96CD|OEBACKUP.EXE|VCLUnZip.pas|TVCLUnZip |ReadZip |1923| |004B9680|OEBACKUP.EXE|VCLUnZip.pas|TVCLUnZip |ReadZip |1915| |004B9077|OEBACKUP.EXE|VCLUnZip.pas|TVCLUnZip |UnZip |1587| |004B9014|OEBACKUP.EXE|VCLUnZip.pas|TVCLUnZip |UnZip |1579| |005054F2|OEBACKUP.EXE|wizard2.pas |TWizard2Dlg|NextBtnClick |1448| |00512819|OEBACKUP.EXE|Start.pas |TStartDlg |LoadBtnClick |365 | |0051FBC0|OEBACKUP.EXE|oebackup.dpr| | |39 | ----------------------------------------------------------------------
|
|
|
Post by Kevin on Feb 27, 2004 10:12:55 GMT -5
1) What version of Delphi are you using?
2) Does this happen anytime you want to unzip just one file or does this only happen when you try to unzip this specific file?
|
|
|
Post by Heiko Schrder on Feb 27, 2004 12:09:45 GMT -5
Hello,
im using Delphi 5 Professional and the error appears ever if I want to extract a file. I believe I forget an initialisation of a property or so what...
|
|
|
Post by Kevin on Feb 27, 2004 22:01:07 GMT -5
This happens even if you try to unzip several files?
It appears from your stack that this error is happening when VCLZip is trying to open and read the zip file. That is even before any attempt is made to unzip any files.
How are your zip files created? Were they created with VCLZip, or some other zip utility?
|
|
|
Post by Heiko Schrder on Feb 28, 2004 3:14:07 GMT -5
The zip files were created by the delphi component DelphiZIP. But i can't believe that the resolve is to search there. Your demo works great.
|
|
|
Post by Heiko Schrder on Feb 28, 2004 3:33:47 GMT -5
A few minutes later I solved the problem. I believe it. I changed the property BlockMode from bmStandard to bmClassic and the files will correct extract. Can you tell me the differences between the two modes? Is this a problem of old Zip format and the new Zip64-Format? Why your demo didnt have any problems?
|
|
|
Post by Kevin on Feb 28, 2004 8:12:55 GMT -5
Is this a multipart zip file that you are working with? Sorry I didn't realize that. ;D
BlockMode controls how the multipart filenames are created and expected to be named when opening them.
bmStandard will name blocks just like PKZip and WinZip expect them to be. That is, with a .zip.z01, .zip.z02, ... .zip extention.
bmClassic will name blocks the way that VCLZip used to name blocks (and the same way VCLZip Lite still does) and that is just .001, .002, ... .00n. VCLZip used this method before PKZip and WinZip even had blocked zip file capabilities. This must be the way DelphiZip does it also.
Kevin
|
|
|
Post by Heiko Schrder on Feb 29, 2004 7:33:56 GMT -5
No this are no multipart zip files.
But I use filenames like this one: Hauptidentität_2004-02-09_11-16-58.oeb
Can this create the problem?
|
|
|
Post by Kevin on Feb 29, 2004 9:18:10 GMT -5
If you aren't using multipart zip files, then setting BlockMode should have NO effect. Do you have MultiMode set to something besides mmNone (which is the default)?
If you are not working with multipart zip files, then your filename extension should not matter, you can make it what you want.
I suspect that it may have been some other change that caused it to start working. Did you make any other changes at all?
|
|
|
Post by Heiko Schrder on Mar 9, 2004 5:27:42 GMT -5
Back to my problem Only I get problems when I use the method FilesList.Add('filename.txt') to specify one file in the zip. The method unzip don't work. The file won't be extracted. The method gives the result 0. So I changed the extraction. I search the file in the zip file and use the method Selected[index] to select the specific file. The method UnZipSelected works great. The specific file will be extracted. What's wrong? What are the differences between the two unzip methods? Do I forget to set a special option for unzipping files via FilesList.Add()?
|
|