From 9ca25eb33e42c530381d54a8e1cd1ad0cac0b137 Mon Sep 17 00:00:00 2001 From: Jan Rio Krause Date: Wed, 17 Nov 2021 14:34:44 +0000 Subject: [PATCH] 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 --- xpcom/io/nsLocalFileWin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index ec18b5771a7f..535725828327 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -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: