~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/stub_sftp.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-05-14 13:39:47 UTC
  • mfrom: (5229.1.9 for-babune)
  • Revision ID: pqm@pqm.ubuntu.com-20100514133947-o8t1joscqjty5n3k
(vila, mgz) Fix sftp homedir path handling on windows

Show diffs side-by-side

added added

removed removed

Lines of Context:
446
446
                'the local current working directory.' % (backing_server,))
447
447
        self._original_vendor = ssh._ssh_vendor_manager._cached_ssh_vendor
448
448
        ssh._ssh_vendor_manager._cached_ssh_vendor = self._vendor
449
 
        # FIXME: the following block should certainly just be self._homedir =
450
 
        # osutils.getcwd() but that fails badly on Unix -- vila 20100224
451
449
        if sys.platform == 'win32':
452
450
            # Win32 needs to use the UNICODE api
453
451
            self._homedir = os.getcwdu()
 
452
            # Normalize the path or it will be wrongly escaped
 
453
            self._homedir = osutils.normpath(self._homedir)
454
454
        else:
455
455
            # But Linux SFTP servers should just deal in bytestreams
456
456
            self._homedir = os.getcwd()