classification
Title: ntpath.samefile doesn't work for hard links
Type: behavior Stage: test needed
Components: Library (Lib), Windows Versions: Python 3.2
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: brian.curtin Nosy List: brian.curtin, ocean-city
Priority: normal Keywords:

Created on 2010-12-07 16:59 by brian.curtin, last changed 2010-12-07 16:59 by brian.curtin.

Messages (1)
msg123564 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-12-07 16:59
ntpath.samefile is currently implemented using GetFinalPathNameByHandle, which doesn't work for hard links.

Since I introduced values for os.stat().st_ino in #8879 (which implemented os.link), I suspect we can possibly change ntpath.samefile to be the same as posixfile.samefile and leave st_ino.


Hirokazu questioned whether or not that st_ino change was correct, but I think it will be fine on NTFS. As FAT does not support links anyways, there would be no issue with potential st_ino issues there as we wouldn't be comparing them for any reason.


(part of the reason I created this is that we have discussion on st_ino and samefile in a few different places and I'm losing track of where we're at)
History
Date User Action Args
2010-12-07 16:59:37brian.curtincreate