mirror of
https://github.com/monero-project/monero.git
synced 2025-08-13 07:45:34 -04:00
epee: string_tools: remove dot from get_extension
Fixes a regression introduced in #9254. Previously it did not include the dot.
This commit is contained in:
parent
0db9e74223
commit
c51ca53daa
2 changed files with 14 additions and 1 deletions
|
@ -178,7 +178,12 @@ namespace string_tools
|
|||
|
||||
std::string get_extension(const std::string& str)
|
||||
{
|
||||
return boost::filesystem::path(str).extension().string();
|
||||
std::string ext_with_dot = boost::filesystem::path(str).extension().string();
|
||||
|
||||
if (ext_with_dot.empty())
|
||||
return {};
|
||||
|
||||
return ext_with_dot.erase(0, 1);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue