wip bigfix
This commit is contained in:
@@ -262,6 +262,7 @@ impl eframe::App for P2PClientApp {
|
||||
if let Some(addr) = &self.active_peer {
|
||||
if let Some(roottree) = self.loaded_fs.get(addr) {
|
||||
if let Some(root) = roottree.data.get(&hash) {
|
||||
self.current_downloading_file_map.root = hash;
|
||||
self.root_downloading_file = name;
|
||||
let _ = self
|
||||
.current_downloading_file_map
|
||||
@@ -299,11 +300,12 @@ impl eframe::App for P2PClientApp {
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
println!("remaining chunks size: {}", self.remaining_chunks.len());
|
||||
if self.remaining_chunks.is_empty() {
|
||||
/*let file = OpenOptions::new()
|
||||
.append(true)
|
||||
.create(true)
|
||||
.open(self.root_downloading_file.clone());
|
||||
let file = OpenOptions::new().append(true).create(true).open(
|
||||
"./Download/".to_string()
|
||||
+ &remove_null_bytes(&self.root_downloading_file.clone()),
|
||||
);
|
||||
|
||||
if let Some(current) = self
|
||||
.current_downloading_file_map
|
||||
@@ -322,8 +324,10 @@ impl eframe::App for P2PClientApp {
|
||||
eprintln!("error creaation file: {}", e);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
println!("bigfile téléchargé");
|
||||
} else {
|
||||
eprintln!("error root absent");
|
||||
}
|
||||
println!("bigfile téléchargé {}", self.root_downloading_file);
|
||||
}
|
||||
}
|
||||
NetworkEvent::Success(msg, peer_username) => {
|
||||
|
||||
Reference in New Issue
Block a user