My stupidness

This commit is contained in:
open-trade 2021-08-20 13:57:53 +08:00 committed by GitHub
parent b2a6c592ba
commit c52f4af17d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -974,7 +974,7 @@ netsh advfirewall firewall delete rule name=\"{app_name} Service\"
fn write_cmds(cmds: String, ext: &str) -> ResultType<std::path::PathBuf> { fn write_cmds(cmds: String, ext: &str) -> ResultType<std::path::PathBuf> {
let mut tmp = std::env::temp_dir(); let mut tmp = std::env::temp_dir();
tmp.push(format!("{}_{}.{}", APP_NAME, crate::get_time(), ext)); tmp.push(format!("{}_{:?}.{}", APP_NAME, cmds.as_ptr(), ext));
let mut cmds = cmds; let mut cmds = cmds;
if ext == "cmd" { if ext == "cmd" {
cmds = format!("{}\ndel /f \"{}\"", cmds, tmp.to_str().unwrap_or("")); cmds = format!("{}\ndel /f \"{}\"", cmds, tmp.to_str().unwrap_or(""));