From d8f4305c85f4f83f2c6983c5da55ba217e9f6daa Mon Sep 17 00:00:00 2001 From: Landeers Date: Mon, 15 Jan 2024 13:07:54 +0100 Subject: [PATCH] rename recovery file (#342) * rename recovery file * add recovery file format explanation --- client/resana_secure/routes/recovery.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/resana_secure/routes/recovery.py b/client/resana_secure/routes/recovery.py index 28231671d..8f2628674 100644 --- a/client/resana_secure/routes/recovery.py +++ b/client/resana_secure/routes/recovery.py @@ -86,7 +86,13 @@ async def export_device(core: LoggedCore) -> tuple[dict[str, Any], int]: finally: path.unlink() - file_name = get_recovery_device_file_name(core.device).replace("parsec-", "resana-secure-", 1) + # base file_name format : parsec-recovery--.psrk + # target file_name : resana-secure-recovery-.psrk + file_name = ( + get_recovery_device_file_name(core.device) + .replace("parsec-", "resana-secure-", 1) + .replace("--unknown-", "") + ) return ( {