mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-100256: Skip inaccessible registry keys in the WinAPI mimetype implementation (GH-122047)
This commit is contained in:
parent
c25898d51e
commit
0bd93755f3
3 changed files with 3 additions and 1 deletions
|
@ -2803,7 +2803,7 @@ _winapi__mimetypes_read_windows_registry_impl(PyObject *module,
|
|||
}
|
||||
|
||||
err = RegOpenKeyExW(hkcr, ext, 0, KEY_READ, &subkey);
|
||||
if (err == ERROR_FILE_NOT_FOUND) {
|
||||
if (err == ERROR_FILE_NOT_FOUND || err == ERROR_ACCESS_DENIED) {
|
||||
err = ERROR_SUCCESS;
|
||||
continue;
|
||||
} else if (err != ERROR_SUCCESS) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue