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

install: remove / from end of path if it exists so as not to mess with .exists() #5730

Merged
merged 5 commits into from
Dec 27, 2023

Conversation

mtimaN
Copy link
Contributor

@mtimaN mtimaN commented Dec 27, 2023

#5720 fix.
I figured paths ending in "/" make .exists() not work properly so I added a check as to remove the / if there is one.

@cakebaker cakebaker changed the title remove / from end of path if it exists so as not to mess with .exists() install: remove / from end of path if it exists so as not to mess with .exists() Dec 27, 2023
@cakebaker
Copy link
Contributor

The change unfortunately breaks the test_install_creating_leading_dirs_with_single_source_and_target_dir test :|

@mtimaN
Copy link
Contributor Author

mtimaN commented Dec 27, 2023

The change unfortunately breaks the test_install_creating_leading_dirs_with_single_source_and_target_dir test :|

I'll look into it. Thanks for the support.

Copy link

GNU testsuite comparison:

GNU test failed: tests/install/create-leading. tests/install/create-leading is passing on 'main'. Maybe you have to rebase?

@mtimaN
Copy link
Contributor Author

mtimaN commented Dec 27, 2023

@cakebaker should be alright now. Let me know what else I have to do before the merge.

@sylvestre
Copy link
Sponsor Contributor

could you please add a test ? thanks

@mtimaN
Copy link
Contributor Author

mtimaN commented Dec 27, 2023

could you please add a test ? thanks

Done.

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)

@cakebaker cakebaker merged commit bf26eda into uutils:main Dec 27, 2023
55 of 56 checks passed
@cakebaker
Copy link
Contributor

Thanks for your PR :)

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.

install: should show the same error regardless of whether target ends with slash
3 participants