mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
* src/ConverterCache.cpp
(ConverterCache::Impl::readIndex): prevent assertion in fs::last_write_time for corrupted cache index git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18341 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
058d731103
commit
9c765e64de
@ -123,6 +123,17 @@ void ConverterCache::Impl::readIndex()
|
||||
continue;
|
||||
}
|
||||
|
||||
// Don't add items that are not in the cache anymore
|
||||
// This can happen if two instances of LyX are running
|
||||
// at the same time and update the index file independantly.
|
||||
if (!fs::exists(item.cache_name.toFilesystemEncoding())) {
|
||||
LYXERR(Debug::FILES) << "Not caching file `"
|
||||
<< orig_from
|
||||
<< "' (cached copy does not exist anymore)."
|
||||
<< std::endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
// Delete the cached file if it is too old
|
||||
if (difftime(now, fs::last_write_time(item.cache_name.toFilesystemEncoding())) >
|
||||
lyxrc.converter_cache_maxage) {
|
||||
|
Loading…
Reference in New Issue
Block a user