Allow named pipes / FIFOs when using FileIO #25328

This commit is contained in:
Nathan Kleyn 2018-07-12 07:31:16 +01:00 committed by Johan Andrén
parent d76b27ba3e
commit a372ad8b03
2 changed files with 20 additions and 8 deletions

View file

@ -73,7 +73,7 @@ private[akka] final class FileSource(path: Path, chunkSize: Int, startPosition:
// this is a bit weird but required to keep existing semantics
if (!Files.exists(path)) throw new NoSuchFileException(path.toString)
require(Files.isRegularFile(path), s"Path '$path' is not a regular file")
require(!Files.isDirectory(path), s"Path '$path' is a directory")
require(Files.isReadable(path), s"Missing read permission for '$path'")
channel = FileChannel.open(path, StandardOpenOption.READ)