Bug 1870617 - Map Windows error 0x1 ERROR_INVALID_FUNCTION to NS_ERROR_FILE_DEVICE_FAILURE r=jstutte,xpcom-reviewers

`ERROR_INVALID_FUNCTION` appears to be a very generic "this device does not support this function".
Given that we deal only with file operations and errors here, this pretty much translates to "this device is not really a working file IO device for us" which makes it appear to be entirely broken for us.

Differential Revision: https://phabricator.services.mozilla.com/D196723
This commit is contained in:
Michael van Straten 2024-03-22 14:35:14 +00:00
Родитель 4c3c1182a2
Коммит 6e3ee549c9
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -326,6 +326,8 @@ static nsresult ConvertWinError(DWORD aWinErr) {
[[fallthrough]]; // to NS_ERROR_FILE_DEVICE_FAILURE
case ERROR_DEV_NOT_EXIST:
[[fallthrough]]; // to NS_ERROR_FILE_DEVICE_FAILURE
case ERROR_INVALID_FUNCTION:
[[fallthrough]]; // to NS_ERROR_FILE_DEVICE_FAILURE
case ERROR_IO_DEVICE:
rv = NS_ERROR_FILE_DEVICE_FAILURE;
break;