mirror of
https://github.com/alterware/alterware-launcher.git
synced 2025-12-04 07:17:50 +00:00
@@ -554,9 +554,13 @@ fn arg_remove_value(args: &mut Vec<String>, arg: &str) {
|
|||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
|
#[cfg(windows)]
|
||||||
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");
|
||||||
|
#[cfg(unix)]
|
||||||
|
let log_file = PathBuf::from("/var/log/alterware-launcher.log");
|
||||||
|
|
||||||
if log_file.exists() && fs::remove_file(&log_file).is_err() {
|
if log_file.exists() && 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.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user