mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 18:54:09 -04: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
@ -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…
x
Reference in New Issue
Block a user