This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sandberg
Recipients sandberg
Date 2009-05-10.10:02:45
SpamBayes Score 3.4714411e-09
Marked as misclassified No
Message-id <1241949768.79.0.988490949056.issue5985@psf.upfronthosting.co.za>
In-reply-to
Content
It would be nice if samefile / sameopenfile was present on Windows.
Right now I usually work around this by keeping a platform-specific hack
for Windows that approximates samefile by comparing normalized paths;
this is ugly and doesn't handle junctions correctly.

In one of my projects I have written a C implementation of samefile,
which I manually monkey-patched os.path with. It would probably be
rather easy to adapt it to become a native part of ntpath.

My code relies on GetFileInformationByHandle, which is only available in
Windows 2000 professional and newer
(http://msdn.microsoft.com/en-us/library/aa364952(VS.85).aspx); if I
understood it correctly this should not be a problem as Python 2.6 and
newer doesn't support older versions of Windows.

Unfortunately I don't use Windows myself, but I have rdesktop access to
an XP machine with cygwin and Visual Studio 2005 installed (which seems
insufficient to build python 2.6, at least), so it will be difficult for
me to test my code. But I'll post some code soon.
History
Date User Action Args
2009-05-10 10:02:48sandbergsetrecipients: + sandberg
2009-05-10 10:02:48sandbergsetmessageid: <1241949768.79.0.988490949056.issue5985@psf.upfronthosting.co.za>
2009-05-10 10:02:47sandberglinkissue5985 messages
2009-05-10 10:02:45sandbergcreate