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

Fix readDir with trailing forward-slash on Windows #220

Merged
merged 1 commit into from
Jul 6, 2024

Conversation

mxruben
Copy link
Contributor

@mxruben mxruben commented Jun 26, 2024

Output is now consistent regardless of the trailing forward-slash on Windows. Looks like this was caused by using std::path::MAIN_SEPARATOR and not taking into account that Windows uses both forward and back slashes. Decided to use tokio's file_name() function instead since it removes the leading path for you. Fixes #216.

Output is now consistent regardless of the trailing forward-slash on Windows. Looks like this
was caused by using std::path::MAIN_SEPARATOR and not taking into account that Windows uses both
forward and back slashes. Decided to use tokio's file_name() function instead since it removes the
leading path for you.
Copy link
Collaborator

@filiptibell filiptibell left a comment

Choose a reason for hiding this comment

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

Yeah, this seems like the right move, especially since the API only returns file names either way. LGTM 👍

@filiptibell filiptibell merged commit cb552af into lune-org:main Jul 6, 2024
6 checks passed
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.

readDir gives different results on Windows if path contains a trailing slash
2 participants