Add support for Borg 2's "sftp://" repository URLs.
All checks were successful
build / test (push) Successful in 4m51s
build / docs (push) Successful in 1m10s

This commit is contained in:
2024-10-26 11:58:26 -07:00
parent fe0fe27c36
commit 7a117d5cc9
3 changed files with 15 additions and 7 deletions

View File

@@ -233,7 +233,11 @@ def normalize(config_filename, config):
path=updated_repository_path,
)
)
elif repository_path.startswith('ssh://') or repository_path.startswith('rclone:'):
elif (
repository_path.startswith('ssh://')
or repository_path.startswith('sftp://')
or repository_path.startswith('rclone:')
):
config['repositories'].append(repository_dict)
else:
rewritten_repository_path = f"ssh://{repository_path.replace(':~', '/~').replace(':/', '/').replace(':', '/./')}"