~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

  • Committer: Aaron Bentley
  • Date: 2006-04-21 23:50:55 UTC
  • mto: This revision was merged to the branch mainline in revision 1683.
  • Revision ID: aaron.bentley@utoronto.ca-20060421235055-cfddf190f5135d73
Better illegal pathname check for Windows

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
import tempfile
26
26
import urllib
27
27
 
28
 
from bzrlib.errors import IllegalPath
29
28
from bzrlib.trace import mutter
30
29
from bzrlib.transport import Transport, Server
31
 
from bzrlib.osutils import abspath, realpath, normpath, pathjoin, rename
 
30
from bzrlib.osutils import (abspath, realpath, normpath, pathjoin, rename, 
 
31
                            check_legal_path)
32
32
 
33
33
 
34
34
class LocalTransport(Transport):
101
101
        path = relpath
102
102
        try:
103
103
            path = self.abspath(relpath)
104
 
            if sys.platform=="win32" and ('<' in path or '>' in path) :
105
 
                raise IllegalPath(path)
 
104
            check_legal_path(path)
106
105
            fp = AtomicFile(path, 'wb', new_mode=mode)
107
106
        except (IOError, OSError),e:
108
107
            self._translate_error(e, path)