[issue38948] os.path.ismount() returns False for current working drive
Steve Dower
report at bugs.python.org
Thu Dec 5 18:33:55 EST 2019
Steve Dower <steve.dower at python.org> added the comment:
> The main problem that I see here is that, in Windows (not POSIX), ntpath.ismount fails to verify that a potential mount point is an existing directory via os.stat and stat.S_ISDIR. ... This would be a breaking change, but I think it's important enough.
So essentially, you say the check should always be "ntpath.isdir(d) and ntpath.ismount(d)" (plus the non-breaking improvements to ismount)? And we should just do the isdir() inside ismount() because otherwise the result is nonsense.
I'm inclined to agree, and I'm not concerned about breaking a nonsense result.
On the other hand, this will make ntpath.ismount meaningless on POSIX, as it will always require real access to the file system. Is it worth having a "pure" implementation for best effort in this case? Based on the splitdrive() patterns we support (plus the fixes to support them properly)?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38948>
_______________________________________
More information about the Python-bugs-list
mailing list