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
clean-path/only
doesn't do what it claims to do
#5447
Comments
After trying to fix it myself I eventually came to agree with @x8x that string version, while (~4x) faster, is way too messy and requires so many special cases to be considered that it's almost impossible to get it right. On the contrary, split+join version is simple and straighforward (I removed Correctness IMO is the priority here. For daily running clean-path on whole filesystems one may rather write a routine. Clean version I'm proposing:
With tests:
|
#5496 somewhat related |
#4258 (comment)
Describe the bug
Cleans-up '.' and '..' in path; returns the cleaned path.
/only => Do not prepend current directory.
Expected behavior
Platform version
The text was updated successfully, but these errors were encountered: