mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix #1330 (Error adding some books)
This commit is contained in:
parent
16cad7b1bc
commit
ada2c73837
@ -50,7 +50,8 @@ def sanitize_file_name(name, substitute='_'):
|
||||
if isinstance(name, unicode):
|
||||
name = name.encode(filesystem_encoding, 'ignore')
|
||||
one = _filename_sanitize.sub(substitute, name)
|
||||
return re.sub(r'\s', ' ', one).strip()
|
||||
one = re.sub(r'\s', ' ', one).strip()
|
||||
return re.sub(r'^\.+$', '_', one)
|
||||
|
||||
FIELD_MAP = {'id':0, 'title':1, 'authors':2, 'publisher':3, 'rating':4, 'timestamp':5,
|
||||
'size':6, 'tags':7, 'comments':8, 'series':9, 'series_index':10,
|
||||
|
Loading…
x
Reference in New Issue
Block a user