Skip to content

Conversation

0xC0FFEEEE
Copy link
Contributor

Simple change that converts trailing slashes of content directories to blackslashes on Windows systems.

Copy link
Contributor

@pyth0n1c pyth0n1c left a comment

Choose a reason for hiding this comment

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

I think a better way to do this is probably a slightly more complex change, but probably more pythonic? We should consider converting the directories from strings to actual pathlib.Path objects and then using file_path.is_relative_to(directory_path)

While this requires more changes in the file, I think this is a lot cleaner and "more correct" - any thoughts on this change instead?

@pyth0n1c
Copy link
Contributor

pyth0n1c commented Apr 1, 2025

@0xC0FFEEEE I've made the alternative change here which updates the typing on the directory field - can you give a look at that one as well and tell me your thoughts in comparison to this one?
Thanks!

Either way, we will get your PR or the PR below merged in the next day or two. Thanks as always for your contributions and feedback :)

#393

@pyth0n1c
Copy link
Contributor

pyth0n1c commented Apr 2, 2025

I am going to close out this PR and merge the following PR, linked above, which has a slightly different solution implemented by converting a list of directory names as strings to more proper Python pathlib.Path objects.

#393

@pyth0n1c pyth0n1c closed this Apr 2, 2025
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.

2 participants