What's wrong
FileScanner.ScanForFiles (FileDeduplicator/FileScanner.cs:35-39, 50) uses Directory.EnumerateFiles. On Unix this returns every entry that is not a directory, including FIFOs, sockets and device nodes, and WalkOptions skips only ReparsePoint. FileHasher.ComputeHash (FileDeduplicator/FileHasher.cs:59-63) then calls File.OpenRead on each one. Opening a FIFO for reading blocks until something opens it for writing, so the Parallel.ForEach in HashFiles (line 21) never finishes. No timeout or cancellation applies. Every verb calls HashFiles, so all of them are affected.
Failure scenario
mkdir t; echo a > t/a; mkfifo t/pipe
ktsu.FileDeduplicator Scan -p t
The output stops after Hashed: a -> ... and the process never ends (killed by timeout 15, exit 124). Real trees can contain FIFOs: home directories, /tmp, application runtime directories, and some build outputs.
Suggested fix
Hash only regular files. In ScanForFiles, drop any entry that isn't a regular file before hashing — on Unix, check the file type (e.g. via stat/File.GetUnixFileMode plus type, or new FileInfo(p) with LinkTarget/attributes) and skip FIFOs, sockets and character/block devices; FileAttributes.Device alone does not reliably catch FIFOs on .NET. Add a test that puts a mkfifo inside a TempTree on Unix and asserts the scan completes.
What's wrong
FileScanner.ScanForFiles(FileDeduplicator/FileScanner.cs:35-39, 50) usesDirectory.EnumerateFiles. On Unix this returns every entry that is not a directory, including FIFOs, sockets and device nodes, andWalkOptionsskips onlyReparsePoint.FileHasher.ComputeHash(FileDeduplicator/FileHasher.cs:59-63) then callsFile.OpenReadon each one. Opening a FIFO for reading blocks until something opens it for writing, so theParallel.ForEachinHashFiles(line 21) never finishes. No timeout or cancellation applies. Every verb callsHashFiles, so all of them are affected.Failure scenario
The output stops after
Hashed: a -> ...and the process never ends (killed bytimeout 15, exit 124). Real trees can contain FIFOs: home directories,/tmp, application runtime directories, and some build outputs.Suggested fix
Hash only regular files. In
ScanForFiles, drop any entry that isn't a regular file before hashing — on Unix, check the file type (e.g. viastat/File.GetUnixFileModeplus type, ornew FileInfo(p)withLinkTarget/attributes) and skip FIFOs, sockets and character/block devices;FileAttributes.Devicealone does not reliably catch FIFOs on .NET. Add a test that puts amkfifoinside aTempTreeon Unix and asserts the scan completes.