[issue2466] os.path.ismount doesn't work for NTFS mounts
Martin v. Löwis
report at bugs.python.org
Sun Mar 23 20:51:20 CET 2008
Martin v. Löwis <martin at v.loewis.de> added the comment:
I cannot reproduce that; it works fine for me, with the same Python
version, on Linux 2.6.22.
Can you please debug through ismount, and report which of the calls fail?
The code of ismount reads
def ismount(path):
"""Test whether a path is a mount point"""
try:
s1 = os.stat(path)
s2 = os.stat(join(path, '..'))
except os.error:
return False # It doesn't exist -- so not a mount point :-)
dev1 = s1.st_dev
dev2 = s2.st_dev
if dev1 != dev2:
return True # path/.. on a different device as path
ino1 = s1.st_ino
ino2 = s2.st_ino
if ino1 == ino2:
return True # path/.. is the same i-node as path
return False
----------
nosy: +loewis
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2466>
__________________________________
More information about the Python-bugs-list
mailing list