Merge pull request #645 from croneter/http_direct_paths

Fix to correctly escape paths
This commit is contained in:
croneter 2019-01-30 18:23:30 +01:00 committed by GitHub
commit ae7eaadd1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1744,7 +1744,13 @@ class API(object):
if path.startswith('\\\\'):
path = 'smb:' + path.replace('\\', '/')
if app.SYNC.escape_path:
path = quote(path)
try:
protocol, hostname, args = path.split(':', 2)
except ValueError:
pass
else:
args = quote(args)
path = '%s:%s:%s' % (protocol, hostname, args)
if (app.SYNC.path_verified and not force_check) or omit_check:
return path