Originally posted by Xaignar
The problem with using such things as the inode to identify the files is that it isn't portable.
i'm aware of this. the most simple idea is the file length. long files only very occassionally have the same file length. (ok, maybe except iso images) and the file length is even part of the ed2k identifier. so something like the following in the hasher should do it:
if filename is unknown
if file length is known
if md4(first chunk of file) == md4(first chunk of known file)
change name in data base
return // don't hash again
endif
endif
endif
hash(file) // unknown
the file name is more easily changed than anything else for a file.
so a check file length + md4(1st block) is more accurate than looking up the file name.
everything else were just additional ideas which could be optionally enabled per platform.
... m2kio !