Skip to content

Conversation

barneygale
Copy link
Contributor

Use target_path.joinpath('_').with_name(source_name) to generate child paths in a target directory when copying. This formula ensures ValueError is raised if the filename is invalid for the target path type (e.g. empty or contains a path separator.)

No change of public behaviour because pathlib.Path is the only exposed implementation of ReadablePath, and validity issues arise only when the source and target path parsers differ.

Use `target_path.joinpath('_').with_name(source_name)` to generate child
paths in a target directory when copying. This formula ensures `ValueError`
is raised if the filename is invalid for the target path type (e.g. empty
or contains a path separator.)

No change of public behaviour because `pathlib.Path` is the only exposed
implementation of `ReadablePath`, and validity issues arise only when the
source and target path parsers differ.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant