Files
fsnap/include
Fabio Scotto di Santolo 0417bd825a Checksum a symlink over its target string
e2b45e6 left symlinks with fingerprint 0 on the grounds that the target
field already describes them. Restore a real checksum for them, computed
over the target string readlink reports -- which is what the link
actually holds on disk -- rather than over the referent's contents, which
is what the code did before e2b45e6 and what made `create /etc` fail with
EISDIR on the 13 links there that point at directories.

Adds crc32_buffer for the in-memory case. Values agree with zlib.crc32
of the same string.

Directories keep 0, and so do FIFOs, sockets and devices: those cannot be
read at all rather than merely being awkward to read. A FIFO blocks until
a writer appears, which is an indefinite hang, not an error.

Also reorder RecordObjectCompare to test target before fingerprint. Since
a link's fingerprint is now a function of its target, the old order
reported a changed target as a changed checksum, and diff printed M where
it should print L. The fields are now compared in the order the record
stores them.

Verified: all 1236 symlinks in a tree shaped like /etc get a non-zero
fingerprint and the walk completes; L, M and P classifications confirmed
individually; valgrind clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018KyCHPAxWzqa3vHKdXJkgx
2026-08-26 16:01:06 +02:00
..
2026-08-25 18:13:29 +02:00
2026-08-26 15:37:57 +02:00