Possible fix for only detecting BeBook main memory and not card.

This commit is contained in:
John Schember 2009-06-15 19:22:49 -04:00
parent 8ff44715fb
commit 7999b3c188
2 changed files with 9 additions and 5 deletions

View File

@ -44,6 +44,10 @@ class BEBOOK(USBMS):
drives['main'] = card drives['main'] = card
drives['carda'] = main drives['carda'] = main
if card and not main:
drives['main'] = card
drives['carda'] = None
return drives return drives
def osx_sort_names(self, names): def osx_sort_names(self, names):

View File

@ -235,12 +235,12 @@ class Device(DeviceConfig, DevicePlugin):
wmi = __import__('wmi', globals(), locals(), [], -1) wmi = __import__('wmi', globals(), locals(), [], -1)
c = wmi.WMI(find_classes=False) c = wmi.WMI(find_classes=False)
for drive in c.Win32_DiskDrive(): for drive in c.Win32_DiskDrive():
if self.windows_match_device(drive, 'WINDOWS_CARD_A_MEM'): if self.windows_match_device(drive, 'WINDOWS_MAIN_MEM') and not drives.get('main', None):
drives['carda'] = self.windows_get_drive_prefix(drive)
elif self.windows_match_device(drive, 'WINDOWS_CARD_B_MEM'):
drives['cardb'] = self.windows_get_drive_prefix(drive)
elif self.windows_match_device(drive, 'WINDOWS_MAIN_MEM'):
drives['main'] = self.windows_get_drive_prefix(drive) drives['main'] = self.windows_get_drive_prefix(drive)
elif self.windows_match_device(drive, 'WINDOWS_CARD_A_MEM') and not drives.get('carda', None):
drives['carda'] = self.windows_get_drive_prefix(drive)
elif self.windows_match_device(drive, 'WINDOWS_CARD_B_MEM') and not drives.get('cardb', None):
drives['cardb'] = self.windows_get_drive_prefix(drive)
if 'main' in drives.keys() and 'carda' in drives.keys() and \ if 'main' in drives.keys() and 'carda' in drives.keys() and \
'cardb' in drives.keys(): 'cardb' in drives.keys():
break break