Skip to content

MockFileSystem's IDirectoryInfo.Create implementation fails with \\?\C:\Foo style paths #1304

@mostynb

Description

@mostynb

Describe the bug

I need to use \\?\C:\Foo style paths on windows, in order to support long paths.

var longPath = @"\\?\C:\some\really\long\string\would\be\here.txt";
var fileSystem = new MockFileSystem();
var parent = fileSystem.Directory.GetParent(longPath);
parent.Create(); // This throws an exception because of the `?` character in the path.

If I use a regular FileSystem instead of MockFileSystem in the code above, there is no exception thrown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    state: needs discussionIssues that need further discussionstate: releasedIssues that are releasedtype: 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