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

bpo-37834: Normalise handling of reparse points on Windows#15231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
zooba merged 3 commits intopython:masterfromzooba:bpo-37834
Aug 21, 2019

Conversation

@zooba
Copy link
Member

@zoobazooba commentedAug 12, 2019
edited by bedevere-bot
Loading

@zoobazooba added type-bugAn unexpected behavior, bug, or error OS-windows needs backport to 3.8 labelsAug 12, 2019
@zoobazooba changed the titlebpo-37834: Enable os.readlink and os.path.is_link to recognize app execution aliasesbpo-37834: Only treat symlink and junction reparse points as linksAug 13, 2019
if (PyModule_AddObject(m,"IO_REPARSE_TAG_MOUNT_POINT",
PyLong_FromUnsignedLong(IO_REPARSE_TAG_MOUNT_POINT)))returnNULL;
if (PyModule_AddObject(m,"IO_REPARSE_TAG_APPEXECLINK",
PyLong_FromUnsignedLong(IO_REPARSE_TAG_APPEXECLINK)))returnNULL;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

IO_REPARSE_TAG_UNHANDLED (0x80000020), going by its name, is always an unhandled tag.IO_REPARSE_TAG_LX_SYMLINK (0xA000001D) should be an unhandled link tag, since it's used for symlinks between an NT file system and a WSL file system (e.g. "/mnt/c/etc" -> "/etc").

I looked over Microsoft's tags for ahandled tag that's not a link, but nothing stands out. I thought that OneDrive used them (i.e.IO_REPARSE_TAG_CLOUD*), but that doesn't appear to be the case anymore. I also thought the new Projected File System support would use them (i.e.IO_REPARSE_TAG_PROJFS). I built theRegFS sample to try to confirm this, and I was surprised to find that none of the virtual directories and files (keys and values) was a reparse point.

However, both OneDrive and ProjFS do make extensive use of the following new file attributes:

FILE_ATTRIBUTE_PINNED  0x00080000FILE_ATTRIBUTE_UNPINNED  0x00100000FILE_ATTRIBUTE_RECALL_ON_OPEN  0x00040000FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS  0x00400000

zooba reacted with thumbs up emoji
* ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed)* nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point)* nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour)* nt.readlink() will read destinations for symlinks and junction points onlybpo-1311: os.path.exists('nul') now returns True on Windows* nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
@zoobazooba changed the titlebpo-37834: Only treat symlink and junction reparse points as linksbpo-37834: Normalise handling of reparse points on WindowsAug 21, 2019
@zoobazooba merged commitdf2d4a6 intopython:masterAug 21, 2019
@zoobazooba deleted the bpo-37834 branchAugust 21, 2019 22:27
@miss-islington
Copy link
Contributor

Thanks@zooba for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry,@zooba, I could not cleanly backport this to3.8 due to a conflict.
Please backport usingcherry_picker on command line.
cherry_picker df2d4a6f3d5da2839c4fc11d31511c8e028daf2c 3.8

@bedevere-bot
Copy link

GH-15370 is a backport of this pull request to the3.8 branch.

lisroach pushed a commit to lisroach/cpython that referenced this pull requestSep 10, 2019
…15231)bpo-37834: Normalise handling of reparse points on Windows* ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed)* nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point)* nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour)* nt.readlink() will read destinations for symlinks and junction points onlybpo-1311: os.path.exists('nul') now returns True on Windows* nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
DinoV pushed a commit to DinoV/cpython that referenced this pull requestJan 14, 2020
…15231)bpo-37834: Normalise handling of reparse points on Windows* ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed)* nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point)* nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour)* nt.readlink() will read destinations for symlinks and junction points onlybpo-1311: os.path.exists('nul') now returns True on Windows* nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
websurfer5 pushed a commit to websurfer5/cpython that referenced this pull requestJul 20, 2020
…15231)bpo-37834: Normalise handling of reparse points on Windows* ntpath.realpath() and nt.stat() will traverse all supported reparse points (previously was mixed)* nt.lstat() will let the OS traverse reparse points that are not name surrogates (previously would not traverse any reparse point)* nt.[l]stat() will only set S_IFLNK for symlinks (previous behaviour)* nt.readlink() will read destinations for symlinks and junction points onlybpo-1311: os.path.exists('nul') now returns True on Windows* nt.stat('nul').st_mode is now S_IFCHR (previously was an error)
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@eryksuneryksuneryksun left review comments

Assignees

@zoobazooba

Labels

OS-windowstype-bugAn unexpected behavior, bug, or error

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@zooba@miss-islington@bedevere-bot@eryksun@the-knights-who-say-ni

[8]ページ先頭

©2009-2025 Movatter.jp