-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os: SameFile should not follow symlinks on windows #21854
Comments
Why do you think your program should return false? I read os.SameFile documentation - "... SameFile only applies to results returned by this package's Stat. It returns false in other cases.". Does that mean os.SameFile should return false if it is given result returned by os.Lstat(path) (regardless what path is) ? Alex |
I think that is a documentation bug.
|
Unix implementation is irrelevant, because we don't have API that does not follow symlinks. Also meaning of "symlinks" is different on Windows. We had to include everything that is not file or directory on Windows in that category. For example, I have U:\ drive on my computer that maps to some share on another computer. Should os.SameFile(os.Lstat( Alex |
Yes, os.SameFile(os.Lstat( |
I don't think NTFS is so special. It is based on computer science like other filesystems and share basic concepts. |
@hirochachacha I do not know what "filesystem entry" is. But if you know how to fix this, go ahead. I won't be working on this. Alex |
Thanks, will do. |
Gentle ping, how's it going @hirochachacha? |
Change https://golang.org/cl/134195 mentions this issue: |
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
false
What did you see instead?
true
Does this issue reproduce with the latest release (go1.9)?
I think so.
System details
The text was updated successfully, but these errors were encountered: