mirror of
https://github.com/alterware/alterware-launcher.git
synced 2025-12-04 07:17:50 +00:00
misc
This commit is contained in:
@@ -34,7 +34,7 @@ pub async fn download_file_progress(
|
|||||||
let total_size = res.content_length().unwrap_or(size);
|
let total_size = res.content_length().unwrap_or(size);
|
||||||
pb.set_length(total_size);
|
pb.set_length(total_size);
|
||||||
let msg = format!(
|
let msg = format!(
|
||||||
"{} {} ({})",
|
"[{}] {} ({})",
|
||||||
"Downloading".bright_yellow(),
|
"Downloading".bright_yellow(),
|
||||||
misc::cute_path(path),
|
misc::cute_path(path),
|
||||||
misc::human_readable_bytes(total_size)
|
misc::human_readable_bytes(total_size)
|
||||||
|
|||||||
@@ -525,10 +525,8 @@ async fn main() {
|
|||||||
let log_file = env::current_exe()
|
let log_file = env::current_exe()
|
||||||
.unwrap_or(PathBuf::from("alterware-launcher"))
|
.unwrap_or(PathBuf::from("alterware-launcher"))
|
||||||
.with_extension("log");
|
.with_extension("log");
|
||||||
if log_file.exists() {
|
if log_file.exists() && fs::remove_file(&log_file).is_err() {
|
||||||
if fs::remove_file(&log_file).is_err() {
|
println!("Couldn't clear log file, make sure target directory is writable.");
|
||||||
println!("Couldn't clear log file, make sure target directory is writable.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
let logger_config = LogConfigBuilder::builder()
|
let logger_config = LogConfigBuilder::builder()
|
||||||
.path(log_file.to_str().unwrap())
|
.path(log_file.to_str().unwrap())
|
||||||
|
|||||||
Reference in New Issue
Block a user