Windows: Add check for ERROR_FILE_NOT_FOUND, which means device removed
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
diff --git a/libusb/os/windows_nt_common.c b/libusb/os/windows_nt_common.c
index 94f8770..ceb764a 100644
--- a/libusb/os/windows_nt_common.c
+++ b/libusb/os/windows_nt_common.c
@@ -486,6 +486,10 @@
usbi_dbg("detected operation aborted");
status = LIBUSB_TRANSFER_CANCELLED;
break;
+ case ERROR_FILE_NOT_FOUND:
+ usbi_dbg("detected device removed");
+ status = LIBUSB_TRANSFER_NO_DEVICE;
+ break;
default:
usbi_err(ITRANSFER_CTX(itransfer), "detected I/O error %u: %s", io_result, windows_error_str(io_result));
status = LIBUSB_TRANSFER_ERROR;
diff --git a/libusb/version_nano.h b/libusb/version_nano.h
index 568ff28..fde5f52 100644
--- a/libusb/version_nano.h
+++ b/libusb/version_nano.h
@@ -1 +1 @@
-#define LIBUSB_NANO 11272
+#define LIBUSB_NANO 11273