mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 11:29:00 +02:00
PR feedback
This commit is contained in:
parent
a675dfe7d2
commit
1632e3b35a
1 changed files with 4 additions and 2 deletions
|
@ -285,10 +285,12 @@ void FileCache::wipe() {
|
|||
}
|
||||
|
||||
void FileCache::clear() {
|
||||
Lock lock(_mutex);
|
||||
|
||||
// Eliminate any overbudget files
|
||||
clean();
|
||||
|
||||
// Mark everything remaining as persisted
|
||||
// Mark everything remaining as persisted while effectively ejecting from the cache
|
||||
for (auto& file : _unusedFiles) {
|
||||
file->_shouldPersist = true;
|
||||
file->_cache = nullptr;
|
||||
|
@ -323,4 +325,4 @@ File::~File() {
|
|||
void File::touch() {
|
||||
utime(_filepath.c_str(), nullptr);
|
||||
_modified = std::max<int64_t>(QFileInfo(_filepath.c_str()).lastRead().toMSecsSinceEpoch(), _modified);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue