Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename recovery file #342

Merged
merged 2 commits into from
Jan 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion client/resana_secure/routes/recovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -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-<id_org>-<user-label="-unknown-">.psrk
# target file_name : resana-secure-recovery-<id_org>.psrk
file_name = (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment to explain the expected pattern ?
(typically this --unknown- part seems strange, I guess the reason is related to the device label being always unknown in resana, and I'm not sure why the double dash part...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

get_recovery_device_file_name(core.device)
.replace("parsec-", "resana-secure-", 1)
.replace("--unknown-", "")
)

return (
{
Expand Down