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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user