only use download folder if exists

This commit is contained in:
Robin Appelman 2023-12-26 20:04:34 +01:00
commit e27296b857
3 changed files with 6 additions and 3 deletions

View file

@ -63,10 +63,13 @@ impl Loader {
#[allow(unused_mut)]
let mut sources = vec![
Arc::new(tf_dir) as Arc<dyn AssetSource + Send + Sync>,
Arc::new(download),
Arc::new(hl_dir),
];
if download.exists() {
sources.push(Arc::new(download));
}
#[cfg(feature = "vpk")]
sources.extend(vpks);