Skip to content

Commit

Permalink
fixed windows compilation (real)
Browse files Browse the repository at this point in the history
  • Loading branch information
UwUDev committed Aug 19, 2024
1 parent 36ecf53 commit 3ea357d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/updater.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::core::restart;
#[cfg(any(target_os = "macos", target_os = "linux"))]
use crate::core::restart;
use mlua::prelude::LuaResult;

pub fn need_update(current_version: String) -> LuaResult<bool> {
Expand Down Expand Up @@ -49,7 +49,7 @@ pub fn self_update(cli_ver: &str) -> LuaResult<()> {
let mut response = client.get(&url).send().unwrap();
let mut file = std::fs::File::create("balamod.tmp").unwrap();
std::io::copy(&mut response, &mut file).unwrap();
std::fs::rename("balamod.tmp", "balamod.exe")?;
std::fs::rename("balamod.tmp", "balamod.exe").unwrap();
drop(file);

let script = include_bytes!("scripts/update.cmd");
Expand Down

0 comments on commit 3ea357d

Please sign in to comment.