mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-04-20 23:20:10 +00:00
Delete the cached mappings if they are empty or corrupt
This commit is contained in:
@@ -32,8 +32,13 @@ void MappingFetcher::start()
|
||||
|
||||
// Only download the file if it's newer than what we have
|
||||
QFileInfo existingFileInfo = Path::getCacheFileInfo("gamecontrollerdb.txt");
|
||||
if (existingFileInfo.exists() && existingFileInfo.size() > 0) {
|
||||
request.setHeader(QNetworkRequest::IfModifiedSinceHeader, existingFileInfo.lastModified().toUTC());
|
||||
if (existingFileInfo.exists()) {
|
||||
if (existingFileInfo.size() > 0) {
|
||||
request.setHeader(QNetworkRequest::IfModifiedSinceHeader, existingFileInfo.lastModified().toUTC());
|
||||
}
|
||||
else {
|
||||
Path::deleteCacheFile("gamecontrollerdb.txt");
|
||||
}
|
||||
}
|
||||
|
||||
// We'll get a callback when this is finished
|
||||
|
||||
Reference in New Issue
Block a user