summaryrefslogtreecommitdiff
path: root/Lib/ntpath.py
diff options
context:
space:
mode:
authorBrian Curtin <brian@python.org>2012-12-26 07:03:03 -0600
committerBrian Curtin <brian@python.org>2012-12-26 07:03:03 -0600
commit490b32a3976d84eaf1d6ca8cdcb00eac0ce5055b (patch)
treef110633e5ef37e78cecac8701874bb7a02c250bf /Lib/ntpath.py
parent2bf61abe02d578a9812cb13d4d71e14f481c4cb5 (diff)
downloadcpython-git-490b32a3976d84eaf1d6ca8cdcb00eac0ce5055b.tar.gz
Fix #11939. Set st_dev attribute on Windows to simplify os.path.samefile.
By setting the st_dev attribute, we can then remove some Windows-specific code and move os.path.samefile/sameopenfile/samestat to Lib/genericpath.py so all platforms share the same implementation.
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r--Lib/ntpath.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index 2fbb6d69dd..ae134846c5 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -652,23 +652,6 @@ except (AttributeError, ImportError):
def _getfinalpathname(f):
return normcase(abspath(f))
-def samefile(f1, f2):
- "Test whether two pathnames reference the same actual file"
- return _getfinalpathname(f1) == _getfinalpathname(f2)
-
-
-try:
- from nt import _getfileinformation
-except ImportError:
- # On other operating systems, just return the fd and see that
- # it compares equal in sameopenfile.
- def _getfileinformation(fd):
- return fd
-
-def sameopenfile(f1, f2):
- """Test whether two file objects reference the same file"""
- return _getfileinformation(f1) == _getfileinformation(f2)
-
try:
# The genericpath.isdir implementation uses os.stat and checks the mode