flattspott
May 31 2004, 02:28 PM
I remember koldfuzion posted something about zips but could recall what it was exactly.
Anyways, the GetZipFileCount function returns an extra count number. Like if the file has 3 files it will say there are 3 files when it should say 2 seeing how it's starting at 0.
BenJeremy
May 31 2004, 02:55 PM
?? Well, isn't that how it SHOULD work?
The function is intended to get the number of entries in the file... like many similar functions in other APIs, it doesn't attempt to match the upper bounds value (due to zero-based indexing), but rather gives you exactly what it describes.
flattspott
May 31 2004, 03:04 PM
Excuse my ignorence then BJ.
So its normal proceedure to Sub the zipcount by 1 before doing anything.
BenJeremy
May 31 2004, 03:11 PM
| QUOTE (flattspott @ May 31 2004, 12:04 PM) |
Excuse my ignorence then BJ.
So its normal proceedure to Sub the zipcount by 1 before doing anything. |
Well, I know it's a pain, but yes, you'd have to sub the number.
...and no need to apologize for anything, flattspott! The File Manager stuff is looking great, and just let me know what you need to make things happen.
koldfuzion
May 31 2004, 03:12 PM
i posted that you could get the info. but it doesnt extract.
flattspott
May 31 2004, 03:21 PM
Getting the info and extracting works for me.
My degugging/test:
| CODE |
Set CurrentPathAndFile $ActualPath$\Test.zip Set CurrentPath Z:
:UNZIP OpenZip CurrentZipFile %CurrentPathAndFile% SetFunc ZipCount GetZipFileCount CurrentZipFile Sub ZipCount 1 MsgBox "ZipCount is %ZipCount%" 0 300 For I = 0 To %ZipCount% GetZipInfo CurrentZipFile %I% Set FileName%I% %ZipEntryName% MsgBox "File %I% is %FileName{I}%" 0 300 Next For I = 0 To %ZipCount% UnzipFile CurrentZipFile %I% %CurrentPath%\%FileName{I}% Next CloseZip CurrentZipFile MsgBox "File UnZipped" 0 300 // Return
|
EDIT: Maybe it was fixed since then
[*] Fixed broken UnRar and UnZip support.
flattspott
May 31 2004, 03:27 PM
| QUOTE |
| and just let me know what you need to make things happen. |
I just have have a small question about the GetZipFileCount. Is that just for zip files or can it be used on rar files too.
BenJeremy
May 31 2004, 03:31 PM
| QUOTE (flattspott @ May 31 2004, 12:27 PM) |
I just have have a small question about the GetZipFileCount. Is that just for zip files or can it be used on rar files too. |
Well, unfortunately, there's a "GetRarFileCount"
I might play around a bit and see if I can make them interchangeable.
flattspott
May 31 2004, 03:36 PM
| QUOTE |
| Well, unfortunately, there's a "GetRarFileCount" |
Oh, I didn't see that in the ActionscriptReadme or the ChangeLog. I figured either rar's didn't have it or they just used the GetZipFileCount. All is good then if that's the case.
koldfuzion
May 31 2004, 05:25 PM
| QUOTE |
EDIT: Maybe it was fixed since then [*] Fixed broken UnRar and UnZip support. |
how did i miss that? last i knew it was still broken. grrr
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.