Skip to content

path.join('C:') = 'C:.' only in windows node LTS version #14405

Description

@XGHeaven
  • 6.11.1:
  • Window 10 x64:

In windows, path.join('C:') return 'C:.' not 'C:'
In other system, such as linux,macos always return 'C:'

In windows, 'path.join('C:\')' is corrrect, return 'C:\'

But you give path.join more than one args, it's correct.
such as path.join('C:', 'a') == 'C:\a'

here is a interesting thing, if you run path.format(path.parse(path.join('C:'))) in windows,
returns 'C:C:.'

I don't know why...

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

    pathIssues and PRs related to the path subsystem.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions