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 up
os: SameFile should not follow symlinks on windows #21854
Please answer these questions before submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
What did you expect to see?
What did you see instead?
Does this issue reproduce with the latest release (go1.9)?
I think so.
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) ?
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(
I don't think NTFS is so special. It is based on computer science like other filesystems and share basic concepts.