Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fixntpath.normpath() for drive-relative paths #126780

Closed
Labels
OS-windowsinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error
@nineteendo

Description

@nineteendo

Bug report

Bug description:

from@eryksun (#117855 (comment)):

Note that the behavior for normalizing drive-relative paths is currently wrong in this case on Windows:

>>> nt._path_normpath('C:./spam')'C:.\\spam'

That's the result that we want here when returning an explicit current directory forinternal use, but that's not the expected behavior fornormpath(). The fallback implementation that's used on POSIX gets it right:

>>> ntpath.normpath('C:./spam')'C:spam'

CPython versions tested on:

CPython main branch

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp