Files
mapsize/internal/platform/open_other.go
T
Andy DixonandClaude Opus 5.5 5966fdd91e AI codebase review
fix: duplicate search no longer hangs on files swapped for FIFOs

Candidates were reopened by path with os.Open after the scan. A file
replaced by a FIFO (or a symlink to one) blocked open(2) forever, and
context cancellation could not interrupt it, wedging the duplicate view
and --duplicates. Content is now opened with O_NOFOLLOW|O_NONBLOCK on
Unix; the existing regular-file check then skips it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 10:59:28 +01:00

9 lines
185 B
Go

//go:build !unix
package platform
import "os"
// OpenContent opens a file whose content is about to be read.
func OpenContent(path string) (*os.File, error) { return os.Open(path) }