/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

Fix bzrlib.urlutils.split() to work properly on win32 local paths.

Show diffs side-by-side

added added

removed removed

Lines of Context:
320
320
 
321
321
    if sys.platform == 'win32' and url.startswith('file:///'):
322
322
        # Strip off the drive letter
323
 
        if path[2:3] not in '\\/':
 
323
        # path is currently /C:/foo
 
324
        if path[2:3] not in ':|' or path[3:4] not in '\\/':
324
325
            raise errors.InvalidURL(url, 
325
326
                'win32 file:/// paths need a drive letter')
326
 
        url_base += path[1:4] # file:///C|/
327
 
        path = path[3:]
 
327
        url_base += path[0:3] # file:// + /C:
 
328
        path = path[3:] # /foo
328
329
 
329
330
    if exclude_trailing_slash and len(path) > 1 and path.endswith('/'):
330
331
        path = path[:-1]