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)
Problem with repacking/updating archive
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
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
https://www.ghisler.com
now it is ok
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;
}
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;
}
- ghisler(Author)
- Site Admin
- Posts: 50475
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
No, not to my knowledge - only if the packer extension is different than the defined extension.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com