Skip to content

Conversation

@pombredanne
Copy link
Member

This enables handling safe paths treating some extra characters as safe on POSIX.
In particular this ensures that we can treat the colon ":" as safe for use in file names
on POSIX only. This will allow correct processing of system files in ScanCode.io
and ExtractCode

Reference: aboutcode-org/extractcode#41
Reference: aboutcode-org/scancode.io#407
Reference: aboutcode-org/scancode.io#445

@pombredanne
Copy link
Member Author

@JonoYang Do you mind to add a few tests so that we can merge this?

@JonoYang JonoYang force-pushed the posix-safe-filename branch from 58acb67 to 6434fdf Compare August 2, 2022 22:14
    * Test posix_only argument for safe_path
    * Update CHANGELOG.rst

Signed-off-by: Jono Yang <[email protected]>
@JonoYang JonoYang force-pushed the posix-safe-filename branch from b9f0457 to b88d65a Compare August 2, 2022 23:37
@JonoYang
Copy link
Member

JonoYang commented Aug 3, 2022

@pombredanne I've added some test code that checks to see if portable_filename preserves or replaces the valid POSIX path characters.

Copy link
Member Author

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

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

LGTM!
Merging.

@pombredanne pombredanne merged commit c31bc0e into main Aug 24, 2022
@pombredanne pombredanne deleted the posix-safe-filename branch August 24, 2022 15:50
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.

3 participants