mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-02-10 10:14:36 +01:00
Fix #6764 (maximum_recursion_depth on shorten_components_to (function recursively calls itself on the same data))
This commit is contained in:
parent
f821c5721c
commit
d1bbd2c498
1 changed files with 3 additions and 0 deletions
|
|
@ -55,6 +55,9 @@ def shorten_components_to(length, components):
|
|||
else:
|
||||
if x is components[-1]:
|
||||
b, _, e = x.rpartition('.')
|
||||
if not b and e:
|
||||
b = e
|
||||
e = ''
|
||||
r = b[:-delta]+e
|
||||
if r.startswith('.'): r = x[0]+r
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue