fs2.io.Watcher#watch
with a relative path to file causes an NPE
#3472
Labels
fs2.io.Watcher#watch
with a relative path to file causes an NPE
#3472
It seems that supplying a relative
java.nio.file.Path
to the watcher'sfs2.io.Watcher#watch
method causes an NPE:At some point
getParent
was called on the path parameter:fs2/io/jvm-native/src/main/scala/fs2/io/DeprecatedWatcher.scala
Line 266 in 1e4d752
If we resolve the path (e.g call
toAbsolutePath
) the issues goes away and the watcher works as expected.Happy to add test and fix in a PR if confirmed.
fs2-io version: 3.11.0
Scastie: https://scastie.scala-lang.org/BoemfzqmQh2HAlRCeGnEbA
The text was updated successfully, but these errors were encountered: