~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/chroot.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
        self.backing_transport = backing_transport
46
46
 
47
47
    def _factory(self, url):
48
 
        assert url.startswith(self.scheme)
49
48
        return ChrootTransport(self, url)
50
49
 
51
50
    def get_url(self):
79
78
 
80
79
    def _safe_relpath(self, relpath):
81
80
        safe_relpath = self._combine_paths(self.base_path, relpath)
82
 
        assert safe_relpath.startswith('/')
 
81
        if not safe_relpath.startswith('/'):
 
82
            raise ValueError(safe_relpath)
83
83
        return safe_relpath[1:]
84
84
 
85
85
    # Transport methods