aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Matrix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/Matrix.cpp')
-rw-r--r--src/plugins/Matrix.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/Matrix.cpp b/src/plugins/Matrix.cpp
index 11eca06..fca4332 100644
--- a/src/plugins/Matrix.cpp
+++ b/src/plugins/Matrix.cpp
@@ -1681,7 +1681,7 @@ namespace QuickMedia {
std::ifstream sync_cache_file_stream;
sync_cache_file_stream.open(matrix_cache_dir.data.c_str(), std::ifstream::in | std::ifstream::binary);
- if(sync_cache_file_stream.good()) {
+ if(sync_cache_file_stream.good() && get_file_type(get_cache_dir().join("matrix").join("updated-cache-version")) == FileType::REGULAR) {
rapidjson::Document doc;
std::string line;
while(std::getline(sync_cache_file_stream, line)) {
@@ -1833,6 +1833,7 @@ namespace QuickMedia {
json_data += '\n';
fwrite(json_data.data(), 1, json_data.size(), sync_cache_file);
+ file_overwrite(get_cache_dir().join("matrix").join("updated-cache-version"), "1"); // To make sure the cache format is up to date
malloc_trim(0);
}
fclose(sync_cache_file);