Skip to content

normalise should not alter paths that start with \\?\ #56

Open
@Rufflewind

Description

@Rufflewind

From https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx#maxpath :

They indicate that the path should be passed to the system with minimal modification, which means that you cannot use forward slashes to represent path separators, or a period to represent the current directory, or double dots to represent the parent directory.

My take from this is that whenever \\?\ is at the beginning of a path, then everything afterward must interpreted literally. Specifically:

  • / should be understood as a normal character, not a path separator
  • . and .. should be understood as normal path segments, not special directories

This means whenever normalise sees a path that starts with \\?\, it should basically do nothing at all.

As of filepath-1.4.1.0, normalise "\\\\?\\C:\\.\\Windows/" == "\\\\?\\C:\\Windows\\", which is incorrect according to MSDN. Instead, it should remain as is.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions