mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
Show the message about clearing the cache in the right place
This commit is contained in:
parent
f0545dacb9
commit
aae905d843
1 changed files with 5 additions and 5 deletions
|
|
@ -294,13 +294,15 @@ def get_file(self, book, name, proceed):
|
|||
key = file_store_name(book, name)
|
||||
err = _(
|
||||
'Failed to read the file {0} for the book {1} from the browser offline cache.'
|
||||
' This usually means the cache is close to full. Clear the browser'
|
||||
' cache from the browser settings.').format(name, book.metadata.title)
|
||||
).format(name, book.metadata.title)
|
||||
self.do_op(['files'], key, err, def (result):
|
||||
if not result:
|
||||
# File was not found in the cache, this happens in Chrome if
|
||||
# the Application Cache is full. IndexedDB put succeeds,
|
||||
# but get fails. Browsers are a horrible travesty.
|
||||
err += _(
|
||||
' This usually means the cache is close to full. Clear the browser'
|
||||
' cache from the browser settings.')
|
||||
self.show_error(_('Cannot read file from book'), err)
|
||||
return
|
||||
fdata = book.stored_files[key]
|
||||
|
|
@ -313,9 +315,7 @@ def get_file(self, book, name, proceed):
|
|||
def get_mathjax_files(self, proceed):
|
||||
c = self.idb.transaction('mathjax').objectStore('mathjax').openCursor()
|
||||
c.onerror = def(event):
|
||||
err = _('Failed to read the MathJax files from local storage.'
|
||||
' This usually means the cache is close to full. Clear the browser'
|
||||
' cache from the browser settings.')
|
||||
err = _('Failed to read the MathJax files from the browser offline cache.')
|
||||
self.display_error(err, event)
|
||||
data = {}
|
||||
c.onsuccess = def(event):
|
||||
|
|
|
|||
Loading…
Reference in a new issue