GetFileNameWithoutExtension return empty string on filename with no extension
See original GitHub issueWhen calling ZlpPathHelper.GetFileNameWithoutExtension
with a filename without extension,
the function is returning an empty string.
The correct return value should be the whole filename, as it doesn’t contain extension.
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Path.GetFileNameWithoutExtension Method (System.IO)
Returns the file name without the extension of a file path that is represented by a read-only character span. GetFileNameWithoutExtension(String).
Read more >Remove file extension from a file name string
GetFileNameWithoutExtension method gives you the filename you pass as an argument without the extension, as should be obvious from the name.
Read more >Get Filename without Extension in PowerShell [3 Ways]
To get filename without extension in powershell, you can use Get-Item cmdlet to get item at specified location and then use BaseName attribute...
Read more >File::getFileNameWithoutExtension issue
It doesn't seem to work correctly if i have a path to a file that has no name. It gives me back the...
Read more >How to Extract filename from a given path in C# - ...
This method is used to get the file name and extension of the specified path string. The returned value is null if the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve found that i was running 1.0.0.6 version, that seems to expose this behaviour. Updating the library to 1.0.0.8 seems to fix the issue.
Sorry, I’ve tried again and still cannot confirm.
These three tests succeed: