I have, due to DFS in my environment, tests running in a dfs path, which results in a UNC path (\\my.domain\dfs\some\path) being passed to copytree in shared_datadir(). This results in copytree failing with
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '\\\\?\\\\\\my.domain\\dfs\\bla...
I traced this back to return '\\\\?\\' + os.path.normpath(path) in plugin._win32_longpath(), which afaict is not correct in case of a UNC path (see above UNC link). Then you need to insert an additional UNC\, so the prefix should be '\\\\?\\UNC\\' instead. UNC paths should be recognizable because they start with \\.
I have, due to DFS in my environment, tests running in a dfs path, which results in a UNC path (
\\my.domain\dfs\some\path) being passed to copytree inshared_datadir(). This results in copytree failing withI traced this back to
return '\\\\?\\' + os.path.normpath(path)inplugin._win32_longpath(), which afaict is not correct in case of a UNC path (see above UNC link). Then you need to insert an additionalUNC\, so the prefix should be'\\\\?\\UNC\\'instead. UNC paths should be recognizable because they start with\\.