From 206d4982ab36cf7cbf7275b92b08316f4d4036e6 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 2 Jan 2011 10:47:12 -0700 Subject: [PATCH] Fix #8159 (Calibre thinks that the Memory Card is Main Memory.) --- src/calibre/devices/scanner.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/calibre/devices/scanner.py b/src/calibre/devices/scanner.py index ab06db1af0..241d503c14 100644 --- a/src/calibre/devices/scanner.py +++ b/src/calibre/devices/scanner.py @@ -63,7 +63,13 @@ class WinPNPScanner(object): order = 0 match = re.search(r'REV_.*?&(\d+)#', pnp_id) if match is None: - match = re.search(r'REV_.*?&(\d+)', pnp_id) + # Windows XP + # On the Nook Color this is the last digit + # + # USBSTOR\DISK&VEN_B&N&PROD_EBOOK_DISK&REV_0100\7&13EAFDB8&0&2004760017462009&1 + # USBSTOR\DISK&VEN_B&N&PROD_EBOOK_DISK&REV_0100\7&13EAFDB8&0&2004760017462009&0 + # + match = re.search(r'REV_.*&(\d+)', pnp_id) if match is not None: order = int(match.group(1)) return order