Skip to content
Snippets Groups Projects

Fix double-escaping of path segments on 1.6.1+

Merged Ryan Gonzalez requested to merge wip/refi64/double-escape into master
2 files
+ 7
2
Compare changes
  • Side-by-side
  • Inline

Files

+ 6
1
@@ -192,13 +192,18 @@ def do_dput(self, subcmd, opts, *args):
superseded = set()
retained = set()
# osc <1.6.1 doesn't automatically escape path members.
should_escape_filename = osc.core.makeurl('', ['+']) == '/+'
for f in remote_file_list.keys():
if f.endswith('.dsc'):
u = osc.core.makeurl(conf.config['apiurl'],
['source',
proj_name,
package_name,
pathname2url(f)],
pathname2url(f)
if should_escape_filename
else f],
query={})
remote_dsc = Dsc(osc.core.streamfile(u, bufsize='line'))
Loading