Bug 1704495 - Map Windows error ERROR_CANNOT_MAKE to NS_ERROR_FILE_ACCESS_DENIED. r=xpcom-reviewers,dom-storage-reviewers,nika,jstutte

Depends on D130906

Differential Revision: https://phabricator.services.mozilla.com/D130907
This commit is contained in:
Jan Rio Krause 2021-11-17 14:34:44 +00:00
parent 065a41c6e0
commit 9ca25eb33e

View File

@ -257,6 +257,8 @@ static nsresult ConvertWinError(DWORD aWinErr) {
case ERROR_ACCESS_DENIED:
[[fallthrough]]; // to NS_ERROR_FILE_ACCESS_DENIED
case ERROR_NOT_SAME_DEVICE:
[[fallthrough]]; // to NS_ERROR_FILE_ACCESS_DENIED
case ERROR_CANNOT_MAKE:
rv = NS_ERROR_FILE_ACCESS_DENIED;
break;
case ERROR_SHARING_VIOLATION: // CreateFile without sharing flags
@ -283,8 +285,6 @@ static nsresult ConvertWinError(DWORD aWinErr) {
case ERROR_FILE_EXISTS:
[[fallthrough]]; // to NS_ERROR_FILE_ALREADY_EXISTS
case ERROR_ALREADY_EXISTS:
[[fallthrough]]; // to NS_ERROR_FILE_ALREADY_EXISTS
case ERROR_CANNOT_MAKE:
rv = NS_ERROR_FILE_ALREADY_EXISTS;
break;
case ERROR_FILENAME_EXCED_RANGE: