nsLocalFileWin::IsExecutable needs to trim trailing dots. Fixes bug 267828. r=dbaron, a=dveditz

git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_1_20050124_BRANCH@169131 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dougt%meer.net
2005-02-11 23:11:03 +00:00
parent 598a685087
commit b1feb3df5e

View File

@@ -1845,6 +1845,13 @@ nsLocalFile::IsExecutable(PRBool *_retval)
else
GetNativePath(path);
// kill trailing dots and spaces.
PRInt32 filePathLen = path.Length() - 1;
while(filePathLen > 0 && (path[filePathLen] == ' ' || path[filePathLen] == '.'))
{
path.Truncate(filePathLen--);
}
// Get extension.
char* ext = ::strrchr( path.BeginWriting(), '.' );
if ( ext ) {