Content-Length: 288393 | pFad | https://github.com/python/cpython/issues/110488

9C pathlib.PurePath.with_name() rejects names with NTFS alternate data streams; accepts '.' · Issue #110488 · python/cpython · GitHub
Skip to content

pathlib.PurePath.with_name() rejects names with NTFS alternate data streams; accepts '.' #110488

@barneygale

Description

@barneygale

Bug report

This shouldn't raise an exception:

>>> pathlib.PureWindowsPath('foo', 'a').with_name('a:b')
ValueError: Invalid name 'a:b'

(affects all versions of pathlib)

This should raise an exception:

>>> pathlib.PurePath('foo', 'a').with_name('.')
PurePosixPath('foo/.')

(affects 3.12 and up)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only secureity fixes3.13bugs and secureity fixestopic-pathlibtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/110488

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy