Packer plugins: incorrect return code handling.

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Eugene
Junior Member
Junior Member
Posts: 17
Joined: 2009-11-17, 20:59 UTC

Packer plugins: incorrect return code handling.

Post by *Eugene »

If DeleteFiles() returns E_BAD_DATA, TC prints "CRC error".
If DeleteFiles() returns E_BAD_ARCHIVE, TC prints "Error in archive file".
I suppose it must be vice versa.

Same is for PackFiles(). But I didn't test all the functions. Dear TC author, could you please review return code handling routines for every function?
User avatar
fenix_productions
Power Member
Power Member
Posts: 1979
Joined: 2005-08-07, 13:23 UTC
Location: Poland
Contact:

Post by *fenix_productions »

2Eugene
According to wcxhead.h file from SDK, you seem to be right:

Code: Select all

#define E_BAD_DATA        12            /* Data is bad */
#define E_BAD_ARCHIVE     13            /* CRC error in archive data */
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...

#128099
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Seems that the documentation isn't very clear here. The documentation is mainly meant for the pack process, not the delete process.

For deleting, the meaning is:
E_BAD_DATA: The archive could be opened OK, but some bad data was encountered during the delete process.
E_BAD_ARCHIVE: The archive as a whole is bad, and cannot be modified.
Author of Total Commander
https://www.ghisler.com
Eugene
Junior Member
Junior Member
Posts: 17
Joined: 2009-11-17, 20:59 UTC

Post by *Eugene »

If PackFiles() returns E_BAD_DATA, TC prints "CRC error".
If PackFiles() returns E_BAD_ARCHIVE, TC prints "Error in archive file".

Code: Select all

#define E_BAD_DATA        12            /* Data is bad */
#define E_BAD_ARCHIVE     13            /* CRC error in archive data */
So this documentation is not for packing purposes too.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48077
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Strange, I will check that and update the docs if necessary.
Author of Total Commander
https://www.ghisler.com
Post Reply