mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix kepub renaming in device driver
This commit is contained in:
parent
92c2691680
commit
c9a4bb9525
@ -469,13 +469,13 @@ class KOBO(USBMS):
|
|||||||
def filename_callback(self, path, mi):
|
def filename_callback(self, path, mi):
|
||||||
# debug_print("Kobo:filename_callback:Path - {0}".format(path))
|
# debug_print("Kobo:filename_callback:Path - {0}".format(path))
|
||||||
if mi.uuid in self.files_to_rename_to_kepub and path.endswith(EPUB_EXT):
|
if mi.uuid in self.files_to_rename_to_kepub and path.endswith(EPUB_EXT):
|
||||||
return path[:-len(EPUB_EXT)] + KEPUB_EXT
|
path = path[:-len(EPUB_EXT)] + KEPUB_EXT + EPUB_EXT
|
||||||
|
else:
|
||||||
idx = path.rfind('.')
|
idx = path.rfind('.')
|
||||||
ext = path[idx:]
|
ext = path[idx:]
|
||||||
if ext == KEPUB_EXT:
|
if ext == KEPUB_EXT:
|
||||||
path = path + EPUB_EXT
|
path = path + EPUB_EXT
|
||||||
# debug_print("Kobo:filename_callback:New path - {0}".format(path))
|
# debug_print("Kobo:filename_callback:New path - {0}".format(path))
|
||||||
|
|
||||||
return path
|
return path
|
||||||
|
|
||||||
def delete_via_sql(self, ContentID, ContentType):
|
def delete_via_sql(self, ContentID, ContentType):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user