diff --git a/mozilla/xpcom/io/nsLocalFileWin.cpp b/mozilla/xpcom/io/nsLocalFileWin.cpp index 7ce2103fe42..ed060642932 100644 --- a/mozilla/xpcom/io/nsLocalFileWin.cpp +++ b/mozilla/xpcom/io/nsLocalFileWin.cpp @@ -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 ) {