~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-04-06 06:05:15 UTC
  • mfrom: (1636.1.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060406060515-5af2d71d458046b7
Fix calling relpath() and abspath() on transports at their root.

Show diffs side-by-side

added added

removed removed

Lines of Context:
583
583
 
584
584
    os.path.commonprefix (python2.4) has a bad bug that it works just
585
585
    on string prefixes, assuming that '/u' is a prefix of '/u2'.  This
586
 
    avoids that problem."""
 
586
    avoids that problem.
 
587
    """
 
588
    if sys.platform != "win32":
 
589
        minlength = 1
 
590
    else:
 
591
        minlength = 3
 
592
    assert len(base) >= minlength, ('Length of base must be equal or exceed the'
 
593
        ' platform minimum length (which is %d)' % minlength)
587
594
    rp = abspath(path)
588
595
 
589
596
    s = []