mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-21 04:13:22 +08:00
[0.3.x] fixed: .py extension case insensitive (workitem/13424)
git-svn-id: https://pykd.svn.codeplex.com/svn@89656 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
d7672c3ffe
commit
26484b85a0
@ -249,8 +249,18 @@ std::string PykdExt::getScriptFileName( const std::string &scriptName )
|
|||||||
{
|
{
|
||||||
std::string scriptFileName = findScript( scriptName );
|
std::string scriptFileName = findScript( scriptName );
|
||||||
|
|
||||||
if ( scriptFileName.empty() && (scriptName.rfind(".py") != scriptName.length() - 3) )
|
if ( scriptFileName.empty() )
|
||||||
|
{
|
||||||
|
std::string scriptNameLow;
|
||||||
|
scriptNameLow.resize( scriptName.size() );
|
||||||
|
std::transform(
|
||||||
|
scriptName.begin(),
|
||||||
|
scriptName.end(),
|
||||||
|
scriptNameLow.begin(),
|
||||||
|
::tolower);
|
||||||
|
if ( scriptNameLow.rfind(".py") != (scriptNameLow.length() - 3) )
|
||||||
scriptFileName = findScript( scriptName + ".py" );
|
scriptFileName = findScript( scriptName + ".py" );
|
||||||
|
}
|
||||||
|
|
||||||
return scriptFileName;
|
return scriptFileName;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user