diff --git a/mozilla/xpcom/io/nsLocalFileWin.cpp b/mozilla/xpcom/io/nsLocalFileWin.cpp index 6c23cc3e4e7..c44e92aa196 100644 --- a/mozilla/xpcom/io/nsLocalFileWin.cpp +++ b/mozilla/xpcom/io/nsLocalFileWin.cpp @@ -1870,8 +1870,6 @@ nsLocalFile::IsExecutable(PRBool *_retval) nsresult rv; - Normalize(); - // only files can be executables PRBool isFile; rv = IsFile(&isFile); @@ -1892,6 +1890,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 = (char *) _mbsrchr((unsigned char *)path.BeginWriting(), '.'); if ( ext ) {