bug 452217 make Create() error code match unix, r=neil, sr=bsmedberg, a=ss
git-svn-id: svn://10.0.0.236/trunk@255115 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
60357dd83e
commit
f36dd2dd96
@ -1029,6 +1029,14 @@ nsLocalFile::Create(PRUint32 type, PRUint32 attributes)
|
||||
&file);
|
||||
if (file)
|
||||
PR_Close(file);
|
||||
|
||||
if (rv == NS_ERROR_FILE_ACCESS_DENIED)
|
||||
{
|
||||
// need to return already-exists for directories (bug 452217)
|
||||
PRBool isdir;
|
||||
if (NS_SUCCEEDED(IsDirectory(&isdir)) && isdir)
|
||||
rv = NS_ERROR_FILE_ALREADY_EXISTS;
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user