mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-01 04:37:34 +00:00
fix crash with relative BORG_KEY_FILE, fixes #3197
(cherry picked from commit 7136e2c93c
)
This commit is contained in:
parent
40186a3ffc
commit
6d67a9f874
1 changed files with 2 additions and 2 deletions
|
@ -695,7 +695,7 @@ def find_key(self):
|
|||
id = self.repository.id
|
||||
keyfile = os.environ.get('BORG_KEY_FILE')
|
||||
if keyfile:
|
||||
return self.sanity_check(keyfile, id)
|
||||
return self.sanity_check(os.path.abspath(keyfile), id)
|
||||
keys_dir = get_keys_dir()
|
||||
for name in os.listdir(keys_dir):
|
||||
filename = os.path.join(keys_dir, name)
|
||||
|
@ -708,7 +708,7 @@ def find_key(self):
|
|||
def get_new_target(self, args):
|
||||
keyfile = os.environ.get('BORG_KEY_FILE')
|
||||
if keyfile:
|
||||
return keyfile
|
||||
return os.path.abspath(keyfile)
|
||||
filename = args.location.to_key_filename()
|
||||
path = filename
|
||||
i = 1
|
||||
|
|
Loading…
Reference in a new issue