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>
9 lines
185 B
Go
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) }
|