mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Fixed removable drive error spam on Windows
This commit is contained in:
parent
289c9ed8ee
commit
ef51897b71
@ -1,19 +1,18 @@
|
||||
# Copyright (c) 2015 Ultimaker B.V.
|
||||
# Copyright (c) 2013 David Braam
|
||||
# Uranium is released under the terms of the AGPLv3 or higher.
|
||||
|
||||
from UM.i18n import i18nCatalog
|
||||
catalog = i18nCatalog("cura")
|
||||
|
||||
from . import RemovableDrivePlugin
|
||||
|
||||
import string
|
||||
import ctypes # type: ignore
|
||||
from ctypes import wintypes # Using ctypes.wintypes in the code below does not seem to work
|
||||
import ctypes
|
||||
from ctypes import wintypes # Using ctypes.wintypes in the code below does not seem to work
|
||||
|
||||
from UM.i18n import i18nCatalog
|
||||
catalog = i18nCatalog("cura")
|
||||
|
||||
# Ignore windows error popups. Fixes the whole "Can't open drive X" when user has an SD card reader.
|
||||
ctypes.windll.kernel32.SetErrorMode(1)
|
||||
|
||||
# WinAPI Constants that we need
|
||||
# Hardcoded here due to stupid WinDLL stuff that does not give us access to these values.
|
||||
DRIVE_REMOVABLE = 2 # [CodeStyle: Windows Enum value]
|
||||
|
Loading…
x
Reference in New Issue
Block a user