-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Why path.basename behaves differently by platform? #6587
Comments
I think 1. can be considered fixed in v6.0.0 in the sense that those always throw a |
/cc @mscdex |
I've checked on appveyor (windows) and travis (linux) that 1. was fixed in v6. |
I'm sorry. |
No, the second case is definitely an unintended regression/bug. I am working on a fix. |
This commit fixes a regression in basename() for the case when a supplied extension name completely matches the resulting basename. Fixes: nodejs#6587 PR-URL: nodejs#6590 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
When path is non-string
When ext matches path's tail and contains a path separator.
FYI,
basename
command behaves as follows (I checked ondarwin
andlinux
):The text was updated successfully, but these errors were encountered: