Ticket #411 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Update QArchive to declare strLastError and method to access it

Reported by: fa7ll7en Owned by:
Priority: minor Milestone: 1.1.1 Stable
Component: Framework Version: 1.1 Development
Keywords: Qarchive, zip, tar Cc:

Description

QArchive.patch is QArchive with $strLastError declared and an added method to access it (e.g QPluginInstaller). It also includes an internal method that uses the integer returned by a zip_open, zip_read, etc to give a more detailed error string. zipFileErrMsg is used was at line 86 which is the else for the is_resource(zip_open()) up at line 39. also used at line 81 .

QArchive3.patch is the same as above but It also has an additional method to extract tar, tar.gz, tar.bz2 archives using the PEAR Archive_Tar package to handle extraction. I dont know if anybody would be interested in it. it doesnt have much in the way of error handling but it works and its a start.

Attachments

QArchive3.patch Download (7.9 KB) - added by fa7ll7en 2 years ago.
QArchive.2.patch Download (5.5 KB) - added by fa7ll7en 2 years ago.
QArchive.patch Download (5.5 KB) - added by fa7ll7en 2 years ago.
QPluginInstaller.patch Download (0.8 KB) - added by fa7ll7en 2 years ago.

Change History

Changed 2 years ago by fa7ll7en

Changed 2 years ago by alex94040

  • status changed from new to in_QA
  • milestone changed from 2.0 to 1.1.1

fa7ll7en, thanks so much for your contribution! As a rule, we try to not introduce dependencies on PEAR libraries, so the first patch (QArchive.patch) seems to make most sense.

There's a small issue with that patch file: tabs. If you look at the patch in Trac, you'll notice that tabs are off. Can you try to fix it and upload a new patch?

Changed 2 years ago by fa7ll7en

Sorry about that Alex. Uploaded and replaced QArchive.patch with a cleaner version.

Changed 2 years ago by fa7ll7en

Hey guy i just remembered that I actually changed one line in QPluginInstaller so that it actually calls strLastError while i was trying to figure out my installation problem.

Changed 2 years ago by alex94040

Fantastic work. Thanks a bunch, fa7ll7en! We'll check this in to be included with the 1.1.1 release shortly.

Changed 2 years ago by alex94040

Fa7ll7en, I'm having issues with the .patch files. I just figured out why - it looks like you used NetBeans to generate the .patch files. NetBeans patch files are notoriously bad (not sure why!) - we've had problems with them in the past. In particular, my TortoiseSVN is refusing to apply the patch.

So we've standardized on using TortoiseSVN or just straight-up svn command line client for generating Patch files. Can you please do me a favor and re-create the patch this way? I'd love to do it for you, but I just can't get the patch applied, no matter how hard I try :-/

Changed 2 years ago by fa7ll7en

Changed 2 years ago by fa7ll7en

Changed 2 years ago by fa7ll7en

Changed 2 years ago by fa7ll7en

Sorry about the delay alex and i will remember that netbeans is bad in the future.
QArchive.patch and QPluginInstaller.patch are generated from command line. let me know if i screwed up again. ;) also how do i delete an attachment? also, QArchive.2.patch is the same as QArchive.patch

Changed 2 years ago by alex94040

Thanks a bunch, fa7ll7en! I'll try your new patch files shortly.

Deleting attachments: just click ont he attachment name, and at the bottom left, after the contents of the patch file, there'll be a Delete button.

Changed 2 years ago by alex94040

  • status changed from in_QA to closed
  • resolution set to fixed

(In [685]) Fixes #411 (Update QArchive to declare strLastError and method to access it). Code by fa7ll7en, reviewed by alex94040.

Changed 2 years ago by alex94040

Checked in! Thanks, fa7ll7en, your new patch worked like a charm.

One quick request: next time when making a patch, can you please make sure to use tabs instead of spaces? That's the QCubed convention. Sorry, there's so many little things that I keep nagging you about... Hope it's not too annoying :) Once again, thanks so much for your contribution - you've made QCubed better!

Changed 2 years ago by fa7ll7en

Glad to help, Alex.
Sometimes nagging is necessary!

Note: See TracTickets for help on using tickets.