Skip to content
This repository
Browse code

Merge remote-tracking branch 'oliverjanik/604-windows-backslashes' in…

…to 604-integration

Conflicts:
	docs/changelog.rst
  • Loading branch information...
commit a0d783134195a9b7250e4f251020a9045938abc4 2 parents a026664 + 8f9d5b0
Jeff Forcier authored December 15, 2012
3  docs/changelog.rst
Source Rendered
@@ -25,6 +25,9 @@ would have also been included in the 1.2 line.
25 25
 Changelog
26 26
 =========
27 27
 
  28
+* :bug:`604` Fixed wrong treatment of backslashes in put operation when uploading
  29
+  directory tree on Windows. Thanks to @jaraco for the catch. Thanks to @dieresys
  30
+  for the patch.
28 31
 * :bug:`792` The newish `~fabric.context_managers.shell_env` context manager
29 32
   was incorrectly omitted from the ``fabric.api`` import endpoint. This has
30 33
   been remedied. Thanks to Vishal Rana for the catch.
2  fabric/sftp.py
@@ -271,6 +271,8 @@ def put_dir(self, local_path, remote_path, use_sudo, mirror_local_mode,
271 271
 
272 272
         for context, dirs, files in os.walk(local_path):
273 273
             rcontext = context.replace(strip, '', 1)
  274
+            # normalize pathname separators with POSIX separator
  275
+            rcontext = rcontext.replace(os.sep, '/')
274 276
             rcontext = rcontext.lstrip('/')
275 277
             rcontext = posixpath.join(remote_path, rcontext)
276 278
 

0 notes on commit a0d7831

Please sign in to comment.
Something went wrong with that request. Please try again.