Merge pull request #8447 from ThomasWaldmann/fix-canonical-path-rclone

Location.canonical_path: some fixes, see #8446
This commit is contained in:
TW 2024-10-03 01:00:11 +02:00 committed by GitHub
commit 349e6e37ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -616,9 +616,10 @@ class Location:
path = "/./" + self.path # /./x = path x relative to cwd
else:
path = self.path
return "ssh://{}{}{}{}".format(
return "{}://{}{}{}{}".format(
self.proto if self.proto else "???",
f"{self.user}@" if self.user else "",
self._host, # needed for ipv6 addrs
self._host if self._host else "", # needed for ipv6 addrs
f":{self.port}" if self.port else "",
path,
)