Commit aa91e9f
committed
Remove locale dependent FileSystemException check
Fin SourceFile, files that do not exist are expected and related exceptions
should be ignored. There are two relevant cases:
scala> java.nio.file.Files.newInputStream(java.nio.file.FileSystems.getDefault().getPath("does-not-exist"))
java.nio.file.NoSuchFileException: does-not-exist
scala> java.nio.file.Files.newInputStream(java.nio.file.FileSystems.getDefault().getPath("regular-file-instead-of-directory/filename"))
java.nio.file.FileSystemException: regular-file-instead-of-directory/filename: Not a directory
Ideally, other I/O errors would be propagated to the caller.
However, there is no reliable way to distinguish them based on the
exceptions alone. In particular, the message cannot be checked, because
it depends on the operating system and it is localized.
Revert the addition of the check and just accept this.1 parent e5f7272 commit aa91e9f
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
282 | | - | |
283 | | - | |
| 282 | + | |
284 | 283 | | |
285 | 284 | | |
286 | 285 | | |
| |||
0 commit comments