Skip to content

Commit

Permalink
twerking
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhelvetican committed Jun 10, 2024
1 parent 32ff012 commit 92dffd2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion terraps/src/core/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ pub async fn get_file(Path(asset): Path<Asset>) -> Response {
} else {
read_json(ASSETS_JSON)
};
assets_list[hash].as_array_mut().unwrap().push(json!(name));
let contains_asset = assets_list[hash].as_array().unwrap().contains(&json!(name));
if !contains_asset {
assets_list[hash].as_array_mut().unwrap().push(json!(name));
}
write_json(ASSETS_JSON, &assets_list);
if config["assets"]["downloadLocally"].as_bool().unwrap() {
if !StdPath::new(&path).exists() {
Expand Down

0 comments on commit 92dffd2

Please sign in to comment.