Skip to content

MockFileSystem.Directory.GetFiles throws DirectoryNotFoundException with invalid characters in directory path #367

@jeremiaskoenig

Description

@jeremiaskoenig

When calling MockFileSystem.Directory.GetFiles(string path, string searchPattern) with a path containing invalid path characters from MockFileSystem.Path.GetInvalidPathChars() a DirectoryNotFoundException is thrown instead of the anticipated ArgumentException which gets thrown by FileSystem.Directory.GetFiles(string path, string searchPattern) creating a different behaviour between test and regular implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: in workIssues that are currently worked ontype: bugIssues that describe misbehaving functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions