mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-21 20:27:46 +00:00
Check if index file is valid before caching
This commit is contained in:
parent
1869c31268
commit
63cfa56074
1 changed files with 3 additions and 1 deletions
|
@ -377,7 +377,9 @@ impl GameData {
|
||||||
|
|
||||||
fn cache_index_file(&mut self, filename: &str) {
|
fn cache_index_file(&mut self, filename: &str) {
|
||||||
if !self.index_files.contains_key(filename) {
|
if !self.index_files.contains_key(filename) {
|
||||||
self.index_files.insert(filename.to_string(), IndexFile::from_existing(filename).unwrap());
|
if let Some(index_file) = IndexFile::from_existing(filename) {
|
||||||
|
self.index_files.insert(filename.to_string(), index_file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue