From 4905393a206440b2829a5cf72d42f2a8222d7156 Mon Sep 17 00:00:00 2001 From: Jan Rio Krause Date: Wed, 9 Feb 2022 15:27:33 +0000 Subject: [PATCH] Bug 1690326 - Map Windows error `ERROR_DISK_CORRUPT` to `NS_ERROR_FILE_FS_CORRUPTED`. r=xpcom-reviewers,dom-storage-reviewers,jstutte,nika Differential Revision: https://phabricator.services.mozilla.com/D138162 --- xpcom/io/nsLocalFileWin.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index a13614488173..72b65cb1c5ef 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -296,6 +296,8 @@ static nsresult ConvertWinError(DWORD aWinErr) { rv = NS_ERROR_FILE_NOT_DIRECTORY; break; case ERROR_FILE_CORRUPT: + [[fallthrough]]; // to NS_ERROR_FILE_FS_CORRUPTED + case ERROR_DISK_CORRUPT: rv = NS_ERROR_FILE_FS_CORRUPTED; break; case ERROR_DEVICE_HARDWARE_ERROR: