mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-02 23:07:36 +02:00
Mostly complete fix for http://bugs.vcmi.eu/view.php?id=2429
This commit is contained in:
parent
9ab7650746
commit
49e2bde3c0
@ -38,7 +38,12 @@ static inline std::string readName(std::string name)
|
||||
{
|
||||
const auto dotPos = name.find_last_of('.');
|
||||
|
||||
if (dotPos != std::string::npos)
|
||||
//do not cut "extension" of directory name
|
||||
auto delimPos = name.find_last_of('/');
|
||||
if(delimPos == std::string::npos)
|
||||
delimPos = name.find_last_of('\\');
|
||||
|
||||
if((delimPos == std::string::npos || delimPos < dotPos) && dotPos != std::string::npos)
|
||||
name.resize(dotPos);
|
||||
|
||||
toUpper(name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user