[0.2.x] fixed : script with 1-2-3 name's length cannot be run with !py command without .py extension

git-svn-id: https://pykd.svn.codeplex.com/svn@81694 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\kernelnet_cp 2012-12-07 15:52:01 +00:00 committed by Mikhail I. Izmestev
parent e4752037ff
commit bf55de75c6

View File

@ -23,7 +23,11 @@ DbgPythonPath::DbgPythonPath()
bool DbgPythonPath::getFullFileName(const std::string &fileName, std::string &fullFileName) const bool DbgPythonPath::getFullFileName(const std::string &fileName, std::string &fullFileName) const
{ {
bool fileHasPyExt = fileName.rfind(".py") == fileName.length() - 3; bool fileHasPyExt = false;
if ( fileName.length() > 3 )
fileHasPyExt = fileName.rfind(".py") == fileName.length() - 3;
fullFileName = fileName; fullFileName = fileName;
if (!fileHasPyExt) if (!fileHasPyExt)