Expand user path in python before setting BORG_RSH

This commit is contained in:
Jonas Hagen 2019-02-22 12:34:05 +01:00 committed by Manuel Riel
parent 5f4078bb38
commit f3059685cd
1 changed files with 2 additions and 1 deletions

View File

@ -55,7 +55,8 @@ class BorgThread(QtCore.QThread, BackupProfileMixin):
env['BORG_RSH'] = 'ssh -oStrictHostKeyChecking=no'
ssh_key = params.get('ssh_key')
if ssh_key is not None:
env['BORG_RSH'] += f' -i ~/.ssh/{ssh_key}'
ssh_key_path = os.path.expanduser(f'~/.ssh/{ssh_key}')
env['BORG_RSH'] += f' -i {ssh_key_path}'
self.env = env
self.cmd = cmd