Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove locale dependent FileSystemException check #21633

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Sep 23, 2024

  1. 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.
    niklasf committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    aa91e9f View commit details
    Browse the repository at this point in the history