mirror of
https://codeberg.org/icewind/tf-asset-loader.git
synced 2026-06-03 08:34:21 +02:00
only use download folder if exists
This commit is contained in:
parent
4476c0f986
commit
e27296b857
3 changed files with 6 additions and 3 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -613,7 +613,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "tf-asset-loader"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
dependencies = [
|
||||
"steamlocate",
|
||||
"thiserror",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "tf-asset-loader"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
edition = "2021"
|
||||
license = "MIT"
|
||||
description = "Utility for loading assets from tf2 data files"
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue