Permalink
Browse files

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

…to 604-integration

Conflicts:
	docs/changelog.rst
  • Loading branch information...
2 parents a026664 + 8f9d5b0 commit a0d783134195a9b7250e4f251020a9045938abc4 @bitprophet bitprophet committed Dec 16, 2012
Showing with 5 additions and 0 deletions.
  1. +3 −0 docs/changelog.rst
  2. +2 −0 fabric/sftp.py
View
@@ -25,6 +25,9 @@ would have also been included in the 1.2 line.
Changelog
=========
+* :bug:`604` Fixed wrong treatment of backslashes in put operation when uploading
+ directory tree on Windows. Thanks to @jaraco for the catch. Thanks to @dieresys
+ for the patch.
* :bug:`792` The newish `~fabric.context_managers.shell_env` context manager
was incorrectly omitted from the ``fabric.api`` import endpoint. This has
been remedied. Thanks to Vishal Rana for the catch.
View
@@ -271,6 +271,8 @@ def put_dir(self, local_path, remote_path, use_sudo, mirror_local_mode,
for context, dirs, files in os.walk(local_path):
rcontext = context.replace(strip, '', 1)
+ # normalize pathname separators with POSIX separator
+ rcontext = rcontext.replace(os.sep, '/')
rcontext = rcontext.lstrip('/')
rcontext = posixpath.join(remote_path, rcontext)

0 comments on commit a0d7831

Please sign in to comment.