|
@@ -469,7 +469,7 @@ class Location:
|
|
|
|
|
|
rclone_re = re.compile(
|
|
rclone_re = re.compile(
|
|
r"""
|
|
r"""
|
|
- (?P<proto>rclone):// # rclone://
|
|
|
|
|
|
+ (?P<proto>rclone): # rclone:
|
|
(?P<path>(.*))
|
|
(?P<path>(.*))
|
|
""",
|
|
""",
|
|
re.VERBOSE,
|
|
re.VERBOSE,
|
|
@@ -616,13 +616,16 @@ class Location:
|
|
path = "/./" + self.path # /./x = path x relative to cwd
|
|
path = "/./" + self.path # /./x = path x relative to cwd
|
|
else:
|
|
else:
|
|
path = self.path
|
|
path = self.path
|
|
- return "{}://{}{}{}{}".format(
|
|
|
|
- self.proto if self.proto else "???",
|
|
|
|
- f"{self.user}@" if self.user else "",
|
|
|
|
- self._host if self._host else "", # needed for ipv6 addrs
|
|
|
|
- f":{self.port}" if self.port else "",
|
|
|
|
- path,
|
|
|
|
- )
|
|
|
|
|
|
+ if self.proto == "rclone":
|
|
|
|
+ return f"{self.proto}:{self.path}"
|
|
|
|
+ else:
|
|
|
|
+ return "{}://{}{}{}{}".format(
|
|
|
|
+ self.proto if self.proto else "???",
|
|
|
|
+ f"{self.user}@" if self.user else "",
|
|
|
|
+ self._host if self._host else "", # needed for ipv6 addrs
|
|
|
|
+ f":{self.port}" if self.port else "",
|
|
|
|
+ path,
|
|
|
|
+ )
|
|
|
|
|
|
def with_timestamp(self, timestamp):
|
|
def with_timestamp(self, timestamp):
|
|
# note: this only affects the repository URL/path, not the archive name!
|
|
# note: this only affects the repository URL/path, not the archive name!
|