mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #2130 (Calibre Stops Reading MOBI Files)
This commit is contained in:
parent
aacd082e54
commit
802385787a
@ -39,7 +39,7 @@ class SpineItem(unicode):
|
|||||||
|
|
||||||
def __new__(cls, *args):
|
def __new__(cls, *args):
|
||||||
obj = super(SpineItem, cls).__new__(cls, *args)
|
obj = super(SpineItem, cls).__new__(cls, *args)
|
||||||
path = args[0]
|
path = args[0].partition('#')[0]
|
||||||
raw = open(path, 'rb').read()
|
raw = open(path, 'rb').read()
|
||||||
raw, obj.encoding = xml_to_unicode(raw)
|
raw, obj.encoding = xml_to_unicode(raw)
|
||||||
obj.character_count = character_count(raw)
|
obj.character_count = character_count(raw)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user