mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-17 10:11:13 +10:00
Fix for redownload invalid chunks (#84)
* feat: Redownloading invalid chunks Signed-off-by: quexeky <git@quexeky.dev> * fix: clippy * fix: clippy x2 --------- Signed-off-by: quexeky <git@quexeky.dev> Co-authored-by: quexeky <git@quexeky.dev>
This commit is contained in:
@ -18,7 +18,7 @@ use crate::remote::requests::make_request;
|
||||
use log::{debug, error, info};
|
||||
use rayon::ThreadPoolBuilder;
|
||||
use std::collections::HashMap;
|
||||
use std::fs::{create_dir_all, OpenOptions};
|
||||
use std::fs::{OpenOptions, create_dir_all};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::mpsc::Sender;
|
||||
use std::sync::{Arc, Mutex};
|
||||
@ -26,7 +26,7 @@ use std::time::Instant;
|
||||
use tauri::{AppHandle, Emitter};
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
use rustix::fs::{fallocate, FallocateFlags};
|
||||
use rustix::fs::{FallocateFlags, fallocate};
|
||||
|
||||
use super::download_logic::download_game_chunk;
|
||||
use super::drop_data::DropData;
|
||||
@ -187,10 +187,7 @@ impl GameDownloadAgent {
|
||||
self.generate_contexts()?;
|
||||
}
|
||||
|
||||
self.context_map
|
||||
.lock()
|
||||
.unwrap()
|
||||
.extend(self.stored_manifest.get_contexts());
|
||||
*self.context_map.lock().unwrap() = self.stored_manifest.get_contexts();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
@ -423,6 +420,7 @@ impl Downloadable for GameDownloadAgent {
|
||||
app_handle,
|
||||
)
|
||||
.unwrap();
|
||||
println!("Attempting to redownload");
|
||||
}
|
||||
|
||||
fn on_cancelled(&self, _app_handle: &tauri::AppHandle) {}
|
||||
|
||||
Reference in New Issue
Block a user