Skip to content

Commit

Permalink
fix: reacquire missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
diamante0018 committed Dec 12, 2023
1 parent 22bac81 commit 5c4ef2c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ async fn update_dir(
.unwrap_or_else(|| Cow::Owned(misc::get_file_sha1(&file_path)))
.to_string();

// Because we don't know here what happened in the call unwrap_or_else above we quietly double-check if the file is missing or not

Check warning on line 222 in src/main.rs

View workflow job for this annotation

GitHub Actions / Lints

Diff in /home/runner/work/alterware-launcher/alterware-launcher/src/main.rs

Check warning on line 222 in src/main.rs

View workflow job for this annotation

GitHub Actions / Lints

Diff in /home/runner/work/alterware-launcher/alterware-launcher/src/main.rs
if !file_path.exists() {
sha1_local = "";

Check failure on line 224 in src/main.rs

View workflow job for this annotation

GitHub Actions / Lints

mismatched types

Check failure on line 224 in src/main.rs

View workflow job for this annotation

GitHub Actions / Test Suite

mismatched types

Check failure on line 224 in src/main.rs

View workflow job for this annotation

GitHub Actions / Check

mismatched types

Check failure on line 224 in src/main.rs

View workflow job for this annotation

GitHub Actions / Test Suite

mismatched types

Check failure on line 224 in src/main.rs

View workflow job for this annotation

GitHub Actions / Check

mismatched types

Check failure on line 224 in src/main.rs

View workflow job for this annotation

GitHub Actions / Lints

mismatched types
}

if sha1_local != sha1_remote {
files_to_download.push(file.clone());
} else {
Expand Down

0 comments on commit 5c4ef2c

Please sign in to comment.