Hirokazu Yamamoto <ocean-c...@m2.ccsnet.ne.jp> added the comment: With following implementation, issamefile return True for hard link. I heard GetFinalPathNameByHandle returns different paths for hard links.
>>> import nt, os >>> def issamefile(path1, path2): ... fd1 = os.open(path1, os.O_RDONLY) ... fd2 = os.open(path2, os.O_RDONLY) ... fi1 = nt._getfileinformation(fd1) ... fi2 = nt._getfileinformation(fd2) ... os.close(fd1) ... os.close(fd2) ... return fi1 == fi2 ... >>> issamefile("src.txt", "lnk.txt") True ---------- nosy: +ocean-city _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8879> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com