Rev 5234: (vila, mgz) Fix sftp homedir path handling on windows in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri May 14 14:39:49 BST 2010


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5234 [merge]
revision-id: pqm at pqm.ubuntu.com-20100514133947-o8t1joscqjty5n3k
parent: pqm at pqm.ubuntu.com-20100514122329-vhb5ozlixpg7bxsu
parent: v.ladeuil+lp at free.fr-20100514093416-3z2f6kqqu2mly4qq
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2010-05-14 14:39:47 +0100
message:
  (vila, mgz) Fix sftp homedir path handling on windows
modified:
  bzrlib/tests/stub_sftp.py      stub_sftp.py-20051027032739-0e7ef4f7bab0e174
=== modified file 'bzrlib/tests/stub_sftp.py'
--- a/bzrlib/tests/stub_sftp.py	2010-05-10 12:12:35 +0000
+++ b/bzrlib/tests/stub_sftp.py	2010-05-14 09:34:16 +0000
@@ -446,11 +446,11 @@
                 'the local current working directory.' % (backing_server,))
         self._original_vendor = ssh._ssh_vendor_manager._cached_ssh_vendor
         ssh._ssh_vendor_manager._cached_ssh_vendor = self._vendor
-        # FIXME: the following block should certainly just be self._homedir =
-        # osutils.getcwd() but that fails badly on Unix -- vila 20100224
         if sys.platform == 'win32':
             # Win32 needs to use the UNICODE api
             self._homedir = os.getcwdu()
+            # Normalize the path or it will be wrongly escaped
+            self._homedir = osutils.normpath(self._homedir)
         else:
             # But Linux SFTP servers should just deal in bytestreams
             self._homedir = os.getcwd()




More information about the bazaar-commits mailing list