Skip to content

Why does filesystem::read_symlink ignore junctions? #2809

Answered by strega-nil-ms
operatios asked this question in Q&A
Discussion options

You must be logged in to vote

@barcharcraz points out that the standard wording for read_symlink is ([fs.op.read.symlink]/1):

Returns: If p resolves to a symbolic link, a path object containing the contents of that symbolic link.

With the definition of "symbolic link" being ([fs.general]/def:symbolic_link):

A symbolic link is a type of file with the property that when the file is encountered during pathname resolution ([fs.class.path]), a string stored by the file is used to modify the pathname resolution.

This says to me that junctions should be considered symbolic links, and therefore read_symlink and copy_symlink should do the obvious thing with junctions as well.

There is a question here, which is whether copy…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by strega-nil-ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants