mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 19:53:22 +08:00
[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:
parent
e4752037ff
commit
bf55de75c6
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user