diff --git a/src/borg/remote.py b/src/borg/remote.py index f3b7ef6f0..093a3e7f3 100644 --- a/src/borg/remote.py +++ b/src/borg/remote.py @@ -332,15 +332,10 @@ def negotiate(self, client_data): def _resolve_path(self, path): if isinstance(path, bytes): path = os.fsdecode(path) - # Leading slash is always present with URI (ssh://), but not with short-form (who@host:path). if path.startswith("/~/"): # /~/x = path x relative to home dir path = os.path.join(get_base_dir(), path[3:]) - elif path.startswith("~/"): - path = os.path.join(get_base_dir(), path[2:]) elif path.startswith("/~"): # /~username/x = relative to "user" home dir path = os.path.expanduser(path[1:]) - elif path.startswith("~"): - path = os.path.expanduser(path) elif path.startswith("/./"): # /./x = path x relative to cwd path = path[3:] return os.path.realpath(path)