Problem with repacking/updating archive

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
ruch
Junior Member
Junior Member
Posts: 2
Joined: 2006-09-26, 17:15 UTC

Problem with repacking/updating archive

Post by *ruch »

My packer plugin (WCX), can create/modify/delete from archives. There is no problem with reading and creating and adding files to archive. But when I edit file in archive TC can't repack/update the file. It shows message Function not supported. What function is called when repacking?

Exported: OpenArchive,ReadHeader,ProcessFile,CloseArchive,PackFiles,DeleteFiles,GetPackerCaps,SetChangeVolProc,SetProcessDataProc

GetPackerCaps return (PK_CAPS_NEW | PK_CAPS_MODIFY | PK_CAPS_MULTIPLE | PK_CAPS_DELETE)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I just checked in my code - PK_CAPS_NEW must be set in this case. I guess that you just need to remove and re-add the plugin because the old packer caps value is still stored in the wincmd.ini.
Author of Total Commander
https://www.ghisler.com
ruch
Junior Member
Junior Member
Posts: 2
Joined: 2006-09-26, 17:15 UTC

now it is ok

Post by *ruch »

I tried removing and re-adding the plugin naturally but it didn't help and value in ini file was ok.

I don't know why but adding PK_CAPS_BY_CONTENT and exporting CanYouHandleThisFile solved the problem. Can you explain this? Is CanYouHandleThisFile function called when repacking?

OK:
int __stdcall GetPackerCaps()
{
return PK_CAPS_NEW | PK_CAPS_MODIFY | PK_CAPS_MULTIPLE | PK_CAPS_DELETE | PK_CAPS_BY_CONTENT;
}

BOOL __stdcall CanYouHandleThisFile(char* filename)
{
if (Plugin_Detect(filename)) return TRUE; else return FALSE;
}
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, not to my knowledge - only if the packer extension is different than the defined extension.
Author of Total Commander
https://www.ghisler.com
Post Reply