From 61bc64adf51d7f04c336eb33c380380b8616432e Mon Sep 17 00:00:00 2001 From: Guido Falsi Date: Mon, 28 Mar 2016 22:33:31 +0200 Subject: [PATCH] FreeBSD hal requires an extra step to get the correct path to the device to be mounted. --- src/calibre/devices/usbms/device.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/devices/usbms/device.py b/src/calibre/devices/usbms/device.py index 0cfaffb341..eddcd0a709 100644 --- a/src/calibre/devices/usbms/device.py +++ b/src/calibre/devices/usbms/device.py @@ -699,7 +699,8 @@ class Device(DeviceConfig, DevicePlugin): d.manufacturer == objif.GetProperty('usb.vendor') and \ d.product == objif.GetProperty('usb.product') and \ d.serial == objif.GetProperty('usb.serial'): - dpaths = manager.FindDeviceStringMatch('storage.originating_device', path) + midpath = manager.FindDeviceStringMatch('info.parent', path) + dpaths = manager.FindDeviceStringMatch('storage.originating_device', midpath[0]) for dpath in dpaths: # devif = dbus.Interface(bus.get_object('org.freedesktop.Hal', dpath), 'org.freedesktop.Hal.Device') try: