Skip to content

UNC path breaks _win32_longpath() #33

@bilderbuchi

Description

@bilderbuchi

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 \\.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions