Skip to content

SC-8: file attribute preservation - #5

Merged
iampryce merged 1 commit into
mainfrom
sc-8-attribute-preservation
Jul 31, 2026
Merged

iampryce merged 1 commit into
mainfrom
sc-8-attribute-preservation

Conversation

@iampryce

Copy link
Copy Markdown
Contributor

Permission, timestamp, ownership, symlink, hard-link, and special-file handling. Ownership strictly gated on FileEntry.OwnershipAvailable. Hard links detected via (device, inode); only FIFOs recreated for special files, sockets/devices explicitly rejected rather than attempted without privilege verification.

Key finding: Go's os.Chmod/os.Chtimes both follow symlinks (no portable Lchmod/Lchtimes) — would have silently modified the link's target instead of the link itself. ApplyAttributes now explicitly skips both for symlink entries, proven by test.

44 new tests, platform-appropriate skips. Clean on Windows and Linux.

Permission, timestamp, ownership, symlink, hard-link, and special-file
handling. Ownership strictly gated on FileEntry.OwnershipAvailable.
Hard links detected via (device, inode); only FIFOs recreated for
special files, sockets/devices explicitly rejected rather than
attempted without privilege verification.

Key finding: Go's os.Chmod/os.Chtimes both follow symlinks (no portable
Lchmod/Lchtimes) — would have silently modified the link's target
instead of the link itself. ApplyAttributes now explicitly skips both
for symlink entries, proven by test.

44 new tests, platform-appropriate skips. Clean on Windows and Linux.
@iampryce
iampryce requested a review from jasonmiller-cc July 31, 2026 17:59
@iampryce
iampryce merged commit 0ae5226 into main Jul 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant