Skip to content

Commit 349e6e3

Browse files
Merge pull request #8447 from ThomasWaldmann/fix-canonical-path-rclone
Location.canonical_path: some fixes, see #8446
2 parents 789ffb0 + 136d3dc commit 349e6e3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/borg/helpers/parseformat.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -616,9 +616,10 @@ def canonical_path(self):
616616
path = "/./" + self.path # /./x = path x relative to cwd
617617
else:
618618
path = self.path
619-
return "ssh://{}{}{}{}".format(
619+
return "{}://{}{}{}{}".format(
620+
self.proto if self.proto else "???",
620621
f"{self.user}@" if self.user else "",
621-
self._host, # needed for ipv6 addrs
622+
self._host if self._host else "", # needed for ipv6 addrs
622623
f":{self.port}" if self.port else "",
623624
path,
624625
)

0 commit comments

Comments
 (0)