Actions
Bug #15267
closedFile.basename + File.extname does not restore the original name
Bug #15267:
File.basename + File.extname does not restore the original name
Description
Related to #15224, I found the case File.basename(name, '.*')+File.extname(name) == File.basename(name) is not true.
Both do not contain the last dot.
basename(1) seems to result in the base name with the dot, when stripping a wildcard suffix.
Files
Updated by jeremyevans0 (Jeremy Evans) almost 7 years ago
- Related to Bug #15244: Method #extname return empty string if filename is dot ('.') added
Updated by jeremyevans0 (Jeremy Evans) almost 7 years ago
Updated by naruse (Yui NARUSE) over 6 years ago
basename(1) seems to result in the base name with the dot, when stripping a wildcard suffix.
basename(1) doesn't handle wildcard.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/basename.html
Updated by akr (Akira Tanaka) over 6 years ago
Updated by nobu (Nobuyoshi Nakada) over 6 years ago
- Status changed from Open to Closed
Applied in changeset git|e169ad93f44e1944ecf7bb65133fd34e8b868ea8.
Fixed File.extname at a name ending with a dot
File.extname now returns a dot string at a name ending with a dot.
[Bug #15267]
Actions