GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use FindFirstFile in ntpath.realpath() when access is denied · Issue #82367 · python/cpython

Use FindFirstFile in ntpath.realpath() when access is denied #82367

New issue
Copy link
New issue
Copy link
Closed
Closed
Use FindFirstFile in ntpath.realpath() when access is denied#82367
Copy link
Labels
OS-windows

Description

@zooba
zooba
opened on Sep 16, 2019
Issue body actions
BPO 38186
Nosy @pfmoore, @tjguk, @zware, @eryksun, @zooba

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2019-09-16.12:53:56.807>
labels = ['3.8', '3.9', 'OS-windows']
title = 'Use FindFirstFile in ntpath.realpath() when access is denied'
updated_at = <Date 2019-09-16.12:56:41.984>
user = 'https://github.com/zooba'

bugs.python.org fields:

activity = <Date 2019-09-16.12:56:41.984>
actor = 'steve.dower'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Windows']
creation = <Date 2019-09-16.12:53:56.807>
creator = 'steve.dower'
dependencies = []
files = []
hgrepos = []
issue_num = 38186
keywords = []
message_count = 2.0
messages = ['352543', '352544']
nosy_count = 5.0
nosy_names = ['paul.moore', 'tim.golden', 'zach.ware', 'eryksun', 'steve.dower']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue38186'
versions = ['Python 3.8', 'Python 3.9']

Linked PRs

  • gh-82367: Use FindFirstFile Win32 API in ntpath.realpath() #110298

Activity

  1. zooba commented on Sep 16, 2019

    @zooba
    zooba
    on Sep 16, 2019
    MemberAuthor
    More actions

    There remains a case in ntpath.realpath() where a (handled) ERROR_ACCESS_DENIED or ERROR_SHARING_VIOLATION will break out of traversing a series of paths.

    However, in this case (in os.stat(), for example), we could request the real name of the file from the directory using FindFirstFileW. This would correct the case and remove any path shortening (e.g. LONGFI~1 to LongFilename) without needing to directly access the file.

  2. zooba
    added
    3.8 (EOL)end of lifeend of life
    3.9 (EOL)end of lifeend of life
    OS-windows
    on Sep 16, 2019
  3. zooba commented on Sep 16, 2019

    @zooba
    zooba
    on Sep 16, 2019
    MemberAuthor
    More actions

    See bpo-38081 and PR 16156 for related discussion and changes.

  4. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  5. moonsikpark
    added a commit that references this issue on Oct 3, 2023

    Merge branch 'python:main' into pythongh-82367-use-findfirstfile-in-n…

    9b7260a
  6. zware
    removed
    3.9 (EOL)end of lifeend of life
    3.8 (EOL)end of lifeend of life
    on Oct 3, 2023
  7. moonsikpark
    added 3 commits that reference this issue on Oct 4, 2023

    pythongh-82367: Use `FindFirstFile` Win32 API in `ntpath.realpath()` (p…

    f675a4f

    pythongh-82367: Use `FindFirstFile` Win32 API in `ntpath.realpath()` (p…

    e17852c

    pythongh-82367: Use `FindFirstFile` Win32 API in `ntpath.realpath()` (p…

    2b5a29e
  8. zware
    added a commit that references this issue on Oct 5, 2023

    gh-82367: Use `FindFirstFile` Win32 API in `ntpath.realpath()` (GH-11…

    d33aa18
  9. zware commented on Oct 5, 2023

    @zware
    zware
    on Oct 5, 2023
    Member
    More actions

    Completed by @moonsikpark in GH-110298. Thanks, Moonsik!

    Reacted by Moonsik Park
  10. zware
    closed this as completedon Oct 5, 2023
  11. Glyphack
    added a commit that references this issue on Sep 2, 2024

    pythongh-82367: Use `FindFirstFile` Win32 API in `ntpath.realpath()` (p…

    5140b4f
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

    OS-windows

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.