SONY device drivers: Ensure that calibre ignores the launcher partition on windows

This commit is contained in:
Kovid Goyal 2009-12-10 15:59:03 -07:00
parent 6167647577
commit 0df3e2ae89
3 changed files with 12 additions and 2 deletions

View File

@ -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)

View File

@ -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

View File

@ -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 <http://www.macworld.com/article/139383/2009/03/fontcacheclear.html>`_.
then the problem is probably a corrupted font cache. You can clear the cache by following these
`instructions <http://www.macworld.com/article/139383/2009/03/fontcacheclear.html>`_. 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?