I am trying to work with UNC to access files on Windows on a partition that does not have a drive letter. The UNC I am trying to use (as returned by mountvol) is
\\?\Volume{6ed63a9f-b672-4f57-8c22-8dd824dd793e}\
Using powershell Get-ChildItem -Literalpath or even dir -l (with the UNC above) works perfectly well.
But using std::filesystem I get an exception that says Invalid Argument.
I try
\\?\Volume{6ed63a9f-b672-4f57-8c22-8dd824dd793e}\data\somefilename
and
\\?\Volume{6ed63a9f-b672-4f57-8c22-8dd824dd793e}\\data\somefilename
without success. What is the correct format?
EDIT
Well, using the fileapi from Windows (CreateFile and ReadFile) works as expected. So my string that identifies the file is perfect.
The only issue is that I would really have preferred to use std::filesystem, since this is what I use in my file access wrapper.
Is this a bug in mingw-w64? I am using
x86_64-w64-mingw32-g++ (GCC) 10-posix 20220113
on Ubuntu 22-04