Merge lp:~mifchip/duplicity/duplicity into lp:~duplicity-team/duplicity/0.7-series

Proposed by mchip
Status: Merged
Merged at revision: 1176
Proposed branch: lp:~mifchip/duplicity/duplicity
Merge into: lp:~duplicity-team/duplicity/0.7-series
Diff against target: 27 lines (+3/-2)
1 file modified
duplicity/backends/ncftpbackend.py (+3/-2)
To merge this branch: bzr merge lp:~mifchip/duplicity/duplicity
Reviewer Review Type Date Requested Status
duplicity-team Pending
Review via email: mp+283731@code.launchpad.net

Description of the change

Bug #1313964 fix. lstrip('/') removed all the slashes, it was an issue.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'duplicity/backends/ncftpbackend.py'
--- duplicity/backends/ncftpbackend.py 2015-01-31 23:30:49 +0000
+++ duplicity/backends/ncftpbackend.py 2016-01-23 21:10:52 +0000
@@ -21,6 +21,7 @@
2121
22import os.path22import os.path
23import urllib23import urllib
24import re
2425
25import duplicity.backend26import duplicity.backend
26from duplicity import globals27from duplicity import globals
@@ -92,13 +93,13 @@
92 self.flags += " -P '%s'" % (parsed_url.port)93 self.flags += " -P '%s'" % (parsed_url.port)
9394
94 def _put(self, source_path, remote_filename):95 def _put(self, source_path, remote_filename):
95 remote_path = os.path.join(urllib.unquote(self.parsed_url.path.lstrip('/')), remote_filename).rstrip()96 remote_path = os.path.join(urllib.unquote(re.sub('^/', '', self.parsed_url.path)), remote_filename).rstrip()
96 commandline = "ncftpput %s -m -V -C '%s' '%s'" % \97 commandline = "ncftpput %s -m -V -C '%s' '%s'" % \
97 (self.flags, source_path.name, remote_path)98 (self.flags, source_path.name, remote_path)
98 self.subprocess_popen(commandline)99 self.subprocess_popen(commandline)
99100
100 def _get(self, remote_filename, local_path):101 def _get(self, remote_filename, local_path):
101 remote_path = os.path.join(urllib.unquote(self.parsed_url.path), remote_filename).rstrip()102 remote_path = os.path.join(urllib.unquote(re.sub('^/', '', self.parsed_url.path)), remote_filename).rstrip()
102 commandline = "ncftpget %s -V -C '%s' '%s' '%s'" % \103 commandline = "ncftpget %s -V -C '%s' '%s' '%s'" % \
103 (self.flags, self.parsed_url.hostname, remote_path.lstrip('/'), local_path.name)104 (self.flags, self.parsed_url.hostname, remote_path.lstrip('/'), local_path.name)
104 self.subprocess_popen(commandline)105 self.subprocess_popen(commandline)

Subscribers

People subscribed via source and target branches