If splitdir is passed an argument with a trailing '/' it will return the
empty string as the final component. Calling parent on a Dir object
with the trailing empty component will return a new Dir object just
without the trailing empty string, which is equivalent to the original
rather than the actual parent.
If splitdir is passed an argument with a trailing '/' it will return the empty string as the final component. Calling parent on a Dir object with the trailing empty component will return a new Dir object just without the trailing empty string, which is equivalent to the original rather than the actual parent.