Cleanup leftover pages directories.
This commit is contained in:
parent
13988fecf9
commit
beeedc3800
1 changed files with 4 additions and 1 deletions
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
import asyncio
|
||||
import os
|
||||
import shutil
|
||||
import signal
|
||||
|
||||
import eris.fill3 as fill3
|
||||
|
|
@ -85,8 +86,10 @@ def make_result_widget(text, result):
|
|||
appearance = fill3.str_to_appearance(text)
|
||||
page_size = 500
|
||||
if len(appearance) > page_size:
|
||||
pages_dir = result.get_pages_dir()
|
||||
shutil.rmtree(pages_dir, ignore_errors=True)
|
||||
appearance = eris.paged_list.PagedList(
|
||||
appearance, result.get_pages_dir(), page_size, cache_size=2)
|
||||
appearance, pages_dir, page_size, cache_size=2)
|
||||
return fill3.Fixed(appearance)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue