/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/urlutils.py

Small bugfix to urlutils.join: join('anything', 'http://bar/a/') should not strip the trailing slash.

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
            # XXX: duplicates mess from earlier in this function.  This URL
149
149
            # manipulation code needs some cleaning up.
150
150
            if scheme is not None and len(path) >= 1:
151
 
                host = path[:2]
152
 
                path = path[2:]
 
151
                host = path[:1]
 
152
                path = path[1:]
153
153
            else:
154
154
                host = []
155
155
        else:
157
157
            path = joinpath(path, arg)
158
158
            path = path.split('/')
159
159
    if host:
160
 
        if path and path[0] == '':
 
160
        # Remove the leading slash from the path, so long as it isn't also the
 
161
        # trailing slash, which we want to keep if present.
 
162
        if path and path[0] == '' and len(path) > 1:
161
163
            del path[0]
162
164
        path = host + path
163
165