Fixed an infinite loop in plat_other when using a relative path in a mounted directory.

--HG--
branch : py3k
extra : transplant_source : %B4%A2%DB%EFn%BB%3A%F6%AE%06%F3%29%DB%06%FBE%D0%A2%BEt
This commit is contained in:
Virgil Dupras 2010-07-09 21:46:19 -07:00
parent 2858b5b153
commit 7546aa606a
1 changed files with 2 additions and 1 deletions

View File

@ -33,8 +33,9 @@ EXTERNAL_CANDIDATES = [
def find_mount_point(path):
# Even if something's wrong, "/" is a mount point, so the loop will exit.
path = op.abspath(path) # Required to avoid infinite loop
while not op.ismount(path):
path = op.join(*op.split(path)[:-1])
path = op.split(path)[0]
return path
def find_ext_volume_trash(volume_root):