Bug 43314.

r=Henry Sobotka <sobotka@axess.com>
a=brendan@mozilla.org
s=Robert O'Callahan <roc+moz@cs.cmu.edu>


git-svn-id: svn://10.0.0.236/trunk@73281 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
dougt%netscape.com
2000-06-27 03:35:32 +00:00
parent efb5386074
commit ba45beb562
2 changed files with 8 additions and 3 deletions

View File

@@ -740,8 +740,10 @@ nsLocalFile::Create(PRUint32 type, PRUint32 attributes)
if (type == NORMAL_FILE_TYPE)
{
PRFileDesc* file = PR_Open(mResolvedPath, PR_RDONLY | PR_CREATE_FILE | PR_APPEND, attributes);
if (file) PR_Close(file);
PRFileDesc* file = PR_Open(mResolvedPath, PR_RDONLY | PR_CREATE_FILE | PR_APPEND | PR_EXCL, attributes);
if (!file) return NS_ERROR_FILE_ALREADY_EXISTS;
PR_Close(file);
return NS_OK;
}