mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-29 07:22:59 +02:00
Fix #1919388 [Private bug](https://bugs.launchpad.net/calibre/+bug/1919388)
This commit is contained in:
parent
8b4d27a75b
commit
73a8699e0a
1 changed files with 1 additions and 0 deletions
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
def sanitize_file_name(x):
|
||||
ans = re.sub(r'\s+', ' ', re.sub(r'[?&=;#]', '_', ascii_filename(x))).strip().rstrip('.')
|
||||
ans = re.sub(r'\%2[fF]', '_', ans)
|
||||
ans, ext = ans.rpartition('.')[::2]
|
||||
return (ans.strip() + '.' + ext.strip()).rstrip('.')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue