Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upbpo-37834: Normalise handling of reparse points on Windows #15231
Conversation
zooba
added
type-bugfix
OS-windows
needs backport to 3.8
labels
Aug 12, 2019
the-knights-who-say-ni
added
the
CLA signed
label
Aug 12, 2019
bedevere-bot
added
the
awaiting core review
label
Aug 12, 2019
zooba
changed the title
bpo-37834: Enable os.readlink and os.path.is_link to recognize app execution aliases
bpo-37834: Only treat symlink and junction reparse points as links
Aug 13, 2019
eryksun
reviewed
Aug 15, 2019
eryksun
reviewed
Aug 15, 2019
eryksun
reviewed
Aug 15, 2019
eryksun
reviewed
Aug 20, 2019
| if (PyModule_AddObject(m, "IO_REPARSE_TAG_MOUNT_POINT", | ||
| PyLong_FromUnsignedLong(IO_REPARSE_TAG_MOUNT_POINT))) return NULL; | ||
| if (PyModule_AddObject(m, "IO_REPARSE_TAG_APPEXECLINK", | ||
| PyLong_FromUnsignedLong(IO_REPARSE_TAG_APPEXECLINK))) return NULL; |
This comment has been minimized.
This comment has been minimized.
eryksun
Aug 20, 2019
Contributor
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 a handled 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 the RegFS 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 0x00080000
FILE_ATTRIBUTE_UNPINNED 0x00100000
FILE_ATTRIBUTE_RECALL_ON_OPEN 0x00040000
FILE_ATTRIBUTE_RECALL_ON_DATA_ACCESS 0x00400000
zooba
force-pushed the
zooba:bpo-37834
branch
from
57cc198
to
514d5d7
Aug 21, 2019
zooba
changed the title
bpo-37834: Only treat symlink and junction reparse points as links
bpo-37834: Normalise handling of reparse points on Windows
Aug 21, 2019
zooba
merged commit df2d4a6
into
python:master
Aug 21, 2019
5 checks passed
zooba
deleted the
zooba:bpo-37834
branch
Aug 21, 2019
This comment has been minimized.
This comment has been minimized.
miss-islington
commented
Aug 21, 2019
|
Thanks @zooba for the PR |
bedevere-bot
removed
the
awaiting core review
label
Aug 21, 2019
This comment has been minimized.
This comment has been minimized.
miss-islington
commented
Aug 21, 2019
|
Sorry, @zooba, I could not cleanly backport this to |
miss-islington
assigned
zooba
Aug 21, 2019
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Aug 21, 2019
|
GH-15370 is a backport of this pull request to the 3.8 branch. |
zooba commentedAug 12, 2019
•
edited by bedevere-bot
https://bugs.python.org/issue37834