X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=backend%2Fsrc%2Fminecraft_controller.rs;h=13a3e3f55356f58386cac5bf246d5e06a3daa639;hb=7a8af6c9b7b212b96fbb99b7c733e8470754f373;hp=d9a68c0107c3cb1488abf429cd94de55b0b0d100;hpb=5df9e614e940f47256773b7d0787e46f90082ff7;p=minecraft_web.git diff --git a/backend/src/minecraft_controller.rs b/backend/src/minecraft_controller.rs index d9a68c0..13a3e3f 100644 --- a/backend/src/minecraft_controller.rs +++ b/backend/src/minecraft_controller.rs @@ -35,13 +35,11 @@ impl MinecraftExe { } pub fn format_active_players(&self) -> String { - /* Commented because the player list isn't correct (the number is). if self.active_players.len() == 0 { String::from("") } else { self.active_players.join(", ") - }*/ - self.active_players.len().to_string() + } } pub fn format_last_backup(&self) -> String { @@ -132,7 +130,7 @@ pub fn get_minecraft_executable_information(world_path: &str, backup_path: &str, if processes.len() >= 1 { let process = processes.first().unwrap(); - let world_size = match std::fs::metadata(world_path) { Ok(f) => f.len(), Err(_) => 0u64 }; + let world_size = match fs_extra::dir::get_size(world_path) { Ok(l) => l, Err(_) => 0u64 }; Some( MinecraftExe {