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:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user