coreutils
coreutils copied to clipboard
rm: fix issue #6620 (refuse to remove '.' and '..')
Before processing the directory, if it ends with "." or "..", it now immediately returns with the same error message as GNU Should close #6620
I see this does the same thing as #6621
but tests/rm/r-4 is fixed in the other PR (your modification is smaller than the other which is a +)
Thanks. Do you want me to close this out? Or which PR will get merged?
the other PR code is a bit more complex.
GNU testsuite comparison:
Congrats! The gnu test tests/timeout/timeout is no longer failing!
@just-an-engineer what is your plan wrt this PR?
We can merge this one if @AnirbanHalder654322 doesn't have any progress on the other PR, since I already have it working without regex, it already works on Windows, and since I made them a coauthor on the commits. But if they responds and pushes whatever changes, I'll leave it to you or them, but if the other one gets merged, I can just close this one. So I can go either way. It can be merged right now, or it can be closed if Anirban pushes the necessary changes and you decide to go with that one
@sylvestre, I'm marking this as a draft, and I'll close it out once @AnirbanHalder654322 PR gets merged. His is starting to look a bit cleaner and more fleshed out than mine. Particularly with removing trailing slashes, and more comprehensive tests, in my opinion.
@just-an-engineer it is still marked as draft, are you still working on it? thanks
Since #6621 was merged, maybe we can close this PR ?
sounds good