diff options
| author | Filip Wandzio <contact@philw.dev> | 2026-01-24 08:29:14 +0100 |
|---|---|---|
| committer | Filip Wandzio <contact@philw.dev> | 2026-01-24 08:29:14 +0100 |
| commit | a393e0a2f2c3678a3ea869dc1417fa269f2b1040 (patch) | |
| tree | 606df6a9284b5bd2dbf84fa5e3d363b8e6a01322 /src/util/fs.rs | |
| parent | 72ddd7b7704f2087a52c9c0552446682918c513b (diff) | |
| download | dml-a393e0a2f2c3678a3ea869dc1417fa269f2b1040.tar.gz dml-a393e0a2f2c3678a3ea869dc1417fa269f2b1040.zip | |
Resolve audio not loading bug
Ensure all assets are downloading for each version
Temporarily disable minecraft versions older than 1.8 because of the asset/manifest loading issues
Implement basic documentation of modules
Implement basic async/multithreading for downloading assets
Diffstat (limited to 'src/util/fs.rs')
| -rw-r--r-- | src/util/fs.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/fs.rs b/src/util/fs.rs index b86c0d7..8ecd0d0 100644 --- a/src/util/fs.rs +++ b/src/util/fs.rs | |||
| @@ -2,11 +2,13 @@ | |||
| 2 | 2 | ||
| 3 | use std::path::Path; | 3 | use std::path::Path; |
| 4 | 4 | ||
| 5 | use tokio::fs::remove_file; | ||
| 6 | |||
| 5 | use crate::errors::McError; | 7 | use crate::errors::McError; |
| 6 | 8 | ||
| 7 | pub async fn remove_if_exists(path: &Path) -> Result<(), McError> { | 9 | pub async fn remove_if_exists(path: &Path) -> Result<(), McError> { |
| 8 | if path.exists() { | 10 | if path.exists() { |
| 9 | tokio::fs::remove_file(path).await?; | 11 | remove_file(path).await?; |
| 10 | } | 12 | } |
| 11 | Ok(()) | 13 | Ok(()) |
| 12 | } | 14 | } |
