Small Bug in Compare Feature

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
BRX
Silver Member
Silver Member
Posts: 304
Joined: 2002 Feb 08, 12:12

Small Bug in Compare Feature

Post by BRX »

I'm using very often the compare feature with Ctrl-F9 and the options identical / "comparison based on size".

I noticed it is showing small files as identical if there's only a difference of a few bytes. Can easily be recreated by creating two identical named textfiles with a few characters.

I guess this "fuzzy compare" is not a feature but a bug. It's not only in the latest version but has been there since the 1.7x versions, maybe ever since the introduction of the "comparison based on size" feature.
User avatar
nikos
Site Admin
Site Admin
Posts: 15791
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

can you give a concrete small example?
BRX
Silver Member
Silver Member
Posts: 304
Joined: 2002 Feb 08, 12:12

Post by BRX »

Sure. I noticed it when I downloaded some zips with subtitles and compared them to old ones.

But try this to reproduce:

Create a newfile in left pane with f7. Write content asdf with editor2 in it.

Create another newfile in right pane with f7. Write content asdfe with editor2 in it.

Left one of course 4 bytes, right has 5 bytes.

A compare with Ctrl-F9 (identical, and size only) highlights both as identical.
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

I can reproduce that on XP with v1.8.0.8 [x86].
It seems the "Size" comparison is done using "size on disk" :o
The comparison is based on the number of clusters used to store the file.

PS - on w7, the Size comparison works correctly with v1.8.0.7 [x64]
... and incorrectly after updating to v1.8.0.8 [x64].
User avatar
nikos
Site Admin
Site Admin
Posts: 15791
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

are you using comparison options like

Image

because for me it works as expected!
are you using the stock size column?
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

Except for not trying stock size earlier, yes: those are the options.
Now that I have, I find compare works OK with the stock Size [S] column, but not with the shell-supplied Size column, which worked in x2 v1807, but not in the newer v1808.
User avatar
nikos
Site Admin
Site Admin
Posts: 15791
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

the solution to this mystery is that in XP windows size column has a 1kb resolution and all files smaller than this are reported as 1KB so that the comparison is equal

so use stock size columns only
BRX
Silver Member
Silver Member
Posts: 304
Joined: 2002 Feb 08, 12:12

Post by BRX »

OK, I'll work with stock size then and see.

When you say "all files smaller then this" you actually mean "all size differences"?

Because it happens for bigger files as well if there are only small size differences.

Maybe you even should delete the size column from the menu because of this discrepancy and just leave the stock size in it?
User avatar
nikos
Site Admin
Site Admin
Posts: 15791
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Post by nikos »

as a general rule use stock columns whenever available, they're faster and more dependable
User avatar
fgagnon
Site Admin
Site Admin
Posts: 3737
Joined: 2003 Sep 08, 19:56
Location: Springfield

Post by fgagnon »

nikos wrote:... mystery is that in XP windows size column has a 1kb resolution ...
and upon closer inspection I see in w7 the generic "Size" resolution is .01KB  -- which confused my earlier check where it appeared that v1807 was working correctly with the generic Size comparison. :shock:

Bottom line is that I agree that the best practice is for the user to use the "stock" Size [S] for precise size comparisons.

PS -
re: BRX's suggestion to remove the plain "Size" parameter from the menu.
I think that's a good idea (I can't think of a down-side argument), but I don't know how hard it is to implement.  
Post Reply