From 0df3e2ae89cc253ce4529e502568d6cb26fb49c0 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 10 Dec 2009 15:59:03 -0700 Subject: [PATCH] SONY device drivers: Ensure that calibre ignores the launcher partition on windows --- src/calibre/devices/prs505/driver.py | 3 +++ src/calibre/devices/usbms/device.py | 6 ++++++ src/calibre/manual/faq.rst | 5 +++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/calibre/devices/prs505/driver.py b/src/calibre/devices/prs505/driver.py index a988e2e138..80bf1fc671 100644 --- a/src/calibre/devices/prs505/driver.py +++ b/src/calibre/devices/prs505/driver.py @@ -55,6 +55,9 @@ class PRS505(CLI, Device): MUST_READ_METADATA = True EBOOK_DIR_MAIN = 'database/media/books' + def windows_filter_pnp_id(self, pnp_id): + return '_LAUNCHER' in pnp_id + def open(self): self.report_progress = lambda x, y: x Device.open(self) diff --git a/src/calibre/devices/usbms/device.py b/src/calibre/devices/usbms/device.py index 6da25ee382..21eb23b376 100644 --- a/src/calibre/devices/usbms/device.py +++ b/src/calibre/devices/usbms/device.py @@ -208,6 +208,9 @@ class Device(DeviceConfig, DevicePlugin): return (msz, casz, cbsz) + def windows_filter_pnp_id(self, pnp_id): + return False + def windows_match_device(self, drive, attr): pnp_id = (str(drive.PNPDeviceID) if not isinstance(drive, basestring) else str(drive)).upper() @@ -224,6 +227,9 @@ class Device(DeviceConfig, DevicePlugin): if device_id is None or not test_vendor(): return False + if self.windows_filter_pnp_id(pnp_id): + return False + if hasattr(device_id, 'search'): return device_id.search(pnp_id) is not None diff --git a/src/calibre/manual/faq.rst b/src/calibre/manual/faq.rst index 9c03488cc7..34ce120f8d 100644 --- a/src/calibre/manual/faq.rst +++ b/src/calibre/manual/faq.rst @@ -288,8 +288,9 @@ be printed to it. If the debug output contains a line that looks like:: Qt: internal: -108: Error ATSUMeasureTextImage text/qfontengine_mac.mm -then the problem is a corrupted font cache. You can clear the cache by following these -`instructions `_. +then the problem is probably a corrupted font cache. You can clear the cache by following these +`instructions `_. If that doesn't +solve it, look for a corrupted font file on your system, in ~/Library/Fonts or the like. My antivirus program claims |app| is a virus/trojan?