fix: MockFileSystem's File.WriteAllText, File.ReadAllText, Directory.GetFiles, Directory.Create fail with \\?\C:\foo style paths#1305
Conversation
…gth paths Windows paths can have a `\\?\` prefix, the '?' character is not always invalid. Ref: https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry Refers to TestableIO#1304
|
@mostynb : Thanks for the PR. Could you please check the failing actions? What happens on the real file system when you use |
c8ba403 to
b9d59a2
Compare
|
Pushed an update which added braces to the if block, and updated the PR title.
If I give System.IO.Directory.GetFiles() a \?\ style path on windows, it returns \?\ style paths. |
But this does not work on the |
…turns a DirectoryInfo with an extended path
It did not, so I pushed some changes to make it work, assuming that you always use However, extended length paths aren't normalised internally in MockFileSystem. eg if I create |
tests/TestableIO.System.IO.Abstractions.TestingHelpers.Tests/MockDirectoryTests.cs
Outdated
Show resolved
Hide resolved
…ry.GetFiles support extended length paths too
eeb83c3 to
0918171
Compare
|
Thanks @mostynb, will publish v22.0.15 shortly! |
|
This is addressed in release v22.0.15. |
This is an attempt to fix #1304.