Fix to correctly escape paths

This commit is contained in:
croneter 2019-01-29 13:52:23 +01:00
parent 1e499ebfe6
commit 5f1241adde

View file

@ -1744,7 +1744,13 @@ class API(object):
if path.startswith('\\\\'): if path.startswith('\\\\'):
path = 'smb:' + path.replace('\\', '/') path = 'smb:' + path.replace('\\', '/')
if app.SYNC.escape_path: 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: if (app.SYNC.path_verified and not force_check) or omit_check:
return path return path