On the Windows platform, calling File.ReadAllTextAsync() with an Path.AbsolutePath that contains spaces, represented by %20, results in a System.IO.DirectoryNotFoundException being thrown.
To Reproduce
Steps to reproduce the behavior:
Run the application
Click the [...] button to select a file or folder.
Attempt to open a file, in a location that contains a space in one of the folders of its path.
Notice the error...
Expected behavior
Processing should proceed normally.
Screenshots
Environment
OS: Microsoft Windows 11 Pro v 10.0.22621 Build 22621
Additional context
If I manually replace the %20s with spaces, the file loads successfully.
If I paste the AbsolutePath containing the %20s into Windows File Explorer, it generates the same error.
Describe the bug
On the Windows platform, calling
File.ReadAllTextAsync()
with anPath.AbsolutePath
that contains spaces, represented by%20
, results in aSystem.IO.DirectoryNotFoundException
being thrown.To Reproduce
Steps to reproduce the behavior:
[...]
button to select a file or folder.Expected behavior
Processing should proceed normally.
Screenshots
Environment
Additional context
If I manually replace the
%20
s with spaces, the file loads successfully.If I paste the AbsolutePath containing the
%20
s into Windows File Explorer, it generates the same error.