xbmc/xbmc — pull request #600 by Montellese (2011-12-30 13:03:13+00:00)
Title: upnp: fix additional slash at the end of container URIs

When browsing UPnP shares in XBMC all URI's that point to a subdirectory of the share contain two slashes at the end. This results in odd behaviour when using the "Parent folder" item in the GUI to get back to the parent directory. The logic removes everything up to the second last slash. If I e.g. am in the directory with the URI "upnp://7d7ec181-2b56-37a2-832b-9503f1957eab/0%2e00000//" I end up in the directory with the URI "upnp://7d7ec181-2b56-37a2-832b-9503f1957eab/0%2e00000/" which is the exact same directory.

This fix first checks if there already is a slash at the end of the URI before adding another one.