https://bugs.winehq.org/show_bug.cgi?id=37834
Gabriel Ivăncescu gabrielopcode@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gabrielopcode@gmail.com
--- Comment #1 from Gabriel Ivăncescu gabrielopcode@gmail.com --- Quite late but thanks for the detailed report, I managed to find the culprit.
Note that the prefix is actually correct, because it is using the NT naming scheme, so it looks like ??\UNC\server\share thus it uses the unc dir under dosdevices, and it's perfectly valid.
The issue seems to be when changing the current directory, because it will strip the ??\ from the NT naming scheme, and end up with UNC\sever\share, which no other code will handle. The rest of the Wine code handles current directories of \server\share just fine, and that's what it should be anyway, so I've sent a patch to fix this when setting the directory, to convert it to the \server\share form.
This fixes many issues with UNC for me: I can use Wine's cmd to "cd" into subdirectories from a UNC path just fine now, where previously it failed, I can also create subdirectories with "md" from UNC paths. However "dir" command will still fail to work, but "dir" fails even with an absolute \server\share path, because it's hardcoded to assume drive letters, so that is the fault of Wine's cmd at this point, not UNC paths (and a separate bug should be filed for it).
Other commands have their own issues, for example "md \?\unc\server\share\foo" doesn't work, but "md \server\share\foo" works... again this is the fault of Wine's cmd not handling UNC paths properly, so it's bug in cmd and a completely separate thing (application bug).
UNC paths should now be fully supported for apps that handle them properly, but please test if you can (and are still around to see this), there might be other corner cases that still break with UNC paths that I'm not aware of. For example, I can copy files with Total Commander just fine now to a UNC path.
Please don't test with Wine's cmd and report it as a bug here, instead test it with a Windows application known-to-work with UNC paths and see if it breaks under Wine. (note that only paths should be fully supported now, enumerating network shares is not implemented yet)