Merge pull request #9997 from jherico/ktx_cache_fix

Correctly initialize a file cache with the proper key
This commit is contained in:
samcake 2017-03-25 09:58:32 -07:00 committed by GitHub
commit 8b1a0be754

View file

@ -67,9 +67,9 @@ void FileCache::initialize() {
// load persisted files
foreach(QString filename, files) {
const Key key = filename.section('.', 0, 1).toStdString();
const Key key = filename.section('.', 0, 0).toStdString();
const std::string filepath = dir.filePath(filename).toStdString();
const size_t length = std::ifstream(filepath, std::ios::binary | std::ios::ate).tellg();
const size_t length = QFileInfo(filepath.c_str()).size();
addFile(Metadata(key, length), filepath);
}