mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix regression in 505 driver
This commit is contained in:
parent
e0bd520769
commit
bdc3478139
@ -186,12 +186,12 @@ class PRS505(CLI, Device):
|
|||||||
info = metadata.next()
|
info = metadata.next()
|
||||||
path = location[0]
|
path = location[0]
|
||||||
blist = 2 if location[3] == 'cardb' else 1 if location[3] == 'carda' else 0
|
blist = 2 if location[3] == 'cardb' else 1 if location[3] == 'carda' else 0
|
||||||
|
|
||||||
if path.startswith(self._main_prefix):
|
if self._main_prefix and path.startswith(self._main_prefix):
|
||||||
name = path.replace(self._main_prefix, '')
|
name = path.replace(self._main_prefix, '')
|
||||||
elif path.startswith(self._card_a_prefix):
|
elif self._card_a_prefix and path.startswith(self._card_a_prefix):
|
||||||
name = path.replace(self._card_a_prefix, '')
|
name = path.replace(self._card_a_prefix, '')
|
||||||
elif path.startswith(self._card_b_prefix):
|
elif self._card_b_prefix and path.startswith(self._card_b_prefix):
|
||||||
name = path.replace(self._card_b_prefix, '')
|
name = path.replace(self._card_b_prefix, '')
|
||||||
|
|
||||||
name = name.replace('\\', '/')
|
name = name.replace('\\', '/')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user