Compare by contents with one file being in an 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
User avatar
aziemer
Junior Member
Junior Member
Posts: 53
Joined: 2003-06-11, 06:56 UTC
Location: near Bremen, Germany
Contact:

Compare by contents with one file being in an archive

Post by *aziemer »

@Christian Ghisler

I am just writing a packer plugin supporting WindowsCE Installation CAB file (filenames/pathes where they go on the CE device, registry entries, shortcuts, reconstructing the INF file).

And doing so I found some strange behaviour...

Why isn't it possible to compare two files with "compare by contents", where one of these files is in a subdirectory inside an archive supported by a plugin (not only my current one, but also my IMG plugin - never realized that before...)?

What I do is:
- open an archive in one panel
- going to some subdirectory inside the archive
- extracting a file to the other panel
- selecting these same both files left and right

When I now call "compare by contents", on the side, where the before- extracted file would go, everything is OK. On the side, where the archive file should be, there is no filename displayed. And both compare panels are empty.

This is what I can say what TC does when you call "compare by contents":

- it re-opens the archive
- it goes through the files with PK_SKIP
- it closes the archive

Shouldn't TC extract the marked file to some temporary dir and compare this with the other one ??? And the mysterious of all is, that this works fine with files in the root directory of the archive...

I tried this with some TC versions from the latest downto 6.03a - all the same.

What am I doing wrong?

Andreas

P.S.:

Just saw another thing - not a bug, but remarkable...

In Installation CABs it is possible to use absolute and relative pathes. So it happened that I returned "Programs\somefile" and "\Programs\some_other_file" in the ReadHeader() call.
This leaded to two "Programs" entries in the filepanel root listing. Diving into each of them discover both above files. So the backslash seems to to be discarded in the filename itself, but not when creating the filelist.

Andreas
*** Don't panic ***
aguirRe
Junior Member
Junior Member
Posts: 88
Joined: 2003-02-06, 17:33 UTC
Contact:

Post by *aguirRe »

I've had some similar issues as well with the PAK plugin. In my case I think it's caused by filename case conflicts, because PAK archives are case sensitive and Windows file system is not. Then I sometimes get different CbC behaviour depending on which file that is marked and where the cursor is.
Post Reply