mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-03-04 15:51:37 +00:00
nsLocalFileWin::IsExecutable needs to trim trailing dots. Fixes bug 267828. r=dbaron, a=dveditz
This commit is contained in:
parent
af85c463a4
commit
a5553f58a0
@ -930,7 +930,14 @@ nsLocalFile::Normalize()
|
||||
// add the current component to the path, including the preceding backslash
|
||||
normal.Append(pathBuffer + begin - 1, len + 1);
|
||||
}
|
||||
|
||||
|
||||
// kill trailing dots and spaces.
|
||||
PRInt32 filePathLen = normal.Length() - 1;
|
||||
while(filePathLen > 0 && (normal[filePathLen] == ' ' || normal[filePathLen] == '.'))
|
||||
{
|
||||
normal.Truncate(filePathLen--);
|
||||
}
|
||||
|
||||
NS_CopyUnicodeToNative(normal, mWorkingPath);
|
||||
MakeDirty();
|
||||
#else // WINCE
|
||||
@ -1863,6 +1870,8 @@ nsLocalFile::IsExecutable(PRBool *_retval)
|
||||
|
||||
nsresult rv;
|
||||
|
||||
Normalize();
|
||||
|
||||
// only files can be executables
|
||||
PRBool isFile;
|
||||
rv = IsFile(&isFile);
|
||||
|
Loading…
x
Reference in New Issue
Block a user