mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-21 20:03:11 +02:00
Fix bug #2855: PDB (doc) metadata fixes.
This commit is contained in:
parent
49e1467887
commit
1b63ec3bbc
2 changed files with 2 additions and 2 deletions
|
|
@ -51,5 +51,5 @@ def set_metadata(stream, mi):
|
|||
MetadataWriter(stream, mi)
|
||||
|
||||
stream.seek(0)
|
||||
stream.write(re.sub('[^-A-Za-z0-9]+', '_', mi.title).ljust(32, '\x00')[:32])
|
||||
stream.write('%s\x00' % re.sub('[^-A-Za-z0-9 ]+', '_', mi.title).ljust(31, '\x00')[:31].encode('ascii', 'replace'))
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ def section_count(self):
|
|||
|
||||
def name(self):
|
||||
self.stream.seek(0)
|
||||
return re.sub('[^-A-Za-z0-9 ]+', '', self.stream.read(32).replace('\x00', ''))
|
||||
return self.stream.read(32).replace('\x00', '')
|
||||
|
||||
def full_section_info(self, number):
|
||||
if number not in range(0, self.num_sections):
|
||||
|
|
|
|||
Loading…
Reference in a new issue