mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 18:24:30 -04:00
Fix #1820 (Error when saving to disk a book with 2 or more dots in the Title)
This commit is contained in:
parent
2d3d71abff
commit
3dfbf94db3
@ -69,7 +69,7 @@ def sanitize_file_name(name, substitute='_', as_unicode=False):
|
|||||||
one = re.sub(r'^\.+$', '_', one)
|
one = re.sub(r'^\.+$', '_', one)
|
||||||
if as_unicode:
|
if as_unicode:
|
||||||
one = one.decode(filesystem_encoding)
|
one = one.decode(filesystem_encoding)
|
||||||
return one
|
return one.replace('..', '_')
|
||||||
|
|
||||||
|
|
||||||
class CommandLineError(Exception):
|
class CommandLineError(Exception):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user