When asked to unmount a path, we must check if it has any descendant paths and
unmount those first. Previously we looked for descendants by checking all
mounted paths to see if they started with the path to unmount. Unfortunately, we
did this via string comparison, with the result that path10 was considered a
descendant of path1.
Instead, split the paths and compare by path segment.
When asked to unmount a path, we must check if it has any descendant paths and unmount those first. Previously we looked for descendants by checking all mounted paths to see if they started with the path to unmount. Unfortunately, we did this via string comparison, with the result that
path10
was considered a descendant ofpath1
.Instead, split the paths and compare by path segment.
[fix #5]