New submission from ollieparanoid: After mounting a folder to another folder on the same filesystem with mount --bind, os.path.ismount() still returns False on the destination folder (although there is a mountpoint).
A shell script to reproduce this is below. (Maybe this can be fixed by using /proc/mounts (if available, may not be the case eg. for chroots) for verifying, if the destination folder is really a mountpoint on POSIX/Linux. Although I am not sure how consistent that is through POSIX.) --- #!/bin/sh # Output: # contents of /tmp/destination (should have test.py -> obviously mounted): # test.py # os.path.ismount(): False # create source and destination folders source=/tmp/source destination=/tmp/destination mkdir -p $source $destination # add the python script in the source folder echo "import os.path" >> $source/test.py echo "print('os.path.ismount(): ' + str(os.path.ismount('$destination')))" >> $source/test.py # do the mount --bind sudo mount --bind $source $destination echo "contents of $destination (should have test.py -> obviously mounted):" ls $destination # show the python bug python3 $source/test.py # clean up sudo umount $destination rm $source/test.py rm -d $source $destination ---------- components: Library (Lib) messages: 288863 nosy: Oliver Smith priority: normal severity: normal status: open title: os.path.ismount() always returns false for mount --bind on same filesystem type: behavior versions: Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue29707> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com