Closed Bug 1443651 Opened 2 years ago Closed 2 years ago
Unique should not return failure when files already exist
59 bytes, text/x-review-board-request
CreateUnique currently only checks whether the failure code is NS_ERROR_FILE_ALREADY_EXISTS when trying to create a candidate filename. There are other ways that attempting to create an existing file can fail, particularly when that file is locked. When we get another failure code, we should check to see whether the file exists before treating it as a failure.
Comment on attachment 8956629 [details] Bug 1443651: Don't return failure for access denied from createUnique() if file exists. https://reviewboard.mozilla.org/r/225582/#review232200 Not a big fan of this approach but anything else is likely to be more complex than it is worth.
Attachment #8956629 - Flags: review?(dtownsend) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/e957efe5d14c0a7a79483b477e9a6c9a8e7ddb3f Bug 1443651: Don't return failure for access denied from createUnique() if file exists. r=Mossop
You need to log in before you can comment on or make changes to this bug.