mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 05:27:07 +02:00
Merge pull request #9997 from jherico/ktx_cache_fix
Correctly initialize a file cache with the proper key
This commit is contained in:
commit
8b1a0be754
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue