Skip to content

fix: use filesystem-safe encoding for lock file paths - #1964

Open
Shubham-Padkonde wants to merge 1 commit into
httpie:masterfrom
Shubham-Padkonde:fix/unicode-lockfile-paths
Open

Shubham-Padkonde wants to merge 1 commit into
httpie:masterfrom
Shubham-Padkonde:fix/unicode-lockfile-paths

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Some Unicode configuration paths encode to Base64 containing /. open_with_lockfile() then treats that slash as a directory separator in the temporary lock path and raises FileNotFoundError before opening the configuration file.

Use URL-safe Base64 so the generated lock name stays a single filename. Add tests for Unicode paths, competing lock acquisition, reopening after release, and cleanup when the context raises, plus a changelog entry.

Validation: 17 utility/update-check tests pass, and changed-file Flake8 passes. The two new Unicode cases fail before the fix. A broader run encountered two Big5 charset-detection failures, both reproduced with unchanged upstream code; the full suite was interrupted during slow network tests, so I cannot claim a complete full-suite pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant