Strip excess slashes when joining path parts in `files.sync` operation.
We have to manually join the parts because `path.join` depends on the
OS of the place pyinfra is executing, not the target host.
@@ -484,7 +484,8 @@ def sync(
# Join remote as unix like
'/'.join(
item for item in
- (dest, remote_dirpath, filename)
+ # Remove any existing / where we're going to join
+ (dest.rstrip('/'), remote_dirpath.strip('/'), filename.lstrip('/'))
if item
),
))
