Skip to content

UNC path handling issues #4911

Open
Open

Description

@mwichmann

SCons doesn't always handle UNC paths correctly - _my_splitdrive returns a // as the "drive" - to match what Python's libraries do, it really needs to recognize the server part of the path as a whole, so specifically this will come out wrong:

return '//', p[1:]

_my_splitdrive also doesn't normalize paths, expecting this to have been done - there's a path through FileFinder that does not, which leads to bad results.

The node get_relpath gets into trouble if the target is on a UNC mount and the source is not (or on a different UNC mount) - you can't compute a relative path here, so the result should be an absolute path - but instead a ValueError is raised. rel_path gets into the same trouble, although the outcome is different - an invalid path is produced.

On POSIX systems, SCons.Util.make_path_relative also fails on UNC, since it gets a no-op splitdrive - Windows gets this one right.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions