mirror of
https://github.com/redstrate/Physis.git
synced 2025-04-22 12:47:45 +00:00
Don't use temp variables in installer
This commit is contained in:
parent
4ee2d3235f
commit
a4641cdfce
1 changed files with 2 additions and 2 deletions
|
@ -113,9 +113,9 @@ pub fn install_game(installer_path: &str, game_directory: &str) -> Result<(), In
|
||||||
|
|
||||||
let mut temp_dir = std::env::temp_dir();
|
let mut temp_dir = std::env::temp_dir();
|
||||||
temp_dir.push("data1.cab");
|
temp_dir.push("data1.cab");
|
||||||
let temp_dir_string = temp_dir.to_str().unwrap();
|
let temp_dir_string = CString::new(temp_dir.to_str().unwrap())?;
|
||||||
|
|
||||||
let unshield = unsafe { unshield_open(CString::new(temp_dir_string).unwrap().as_ptr()) };
|
let unshield = unsafe { unshield_open(temp_dir_string.as_ptr()) };
|
||||||
let file_count = unsafe { unshield_file_count(unshield) };
|
let file_count = unsafe { unshield_file_count(unshield) };
|
||||||
|
|
||||||
for i in 0..file_count {
|
for i in 0..file_count {
|
||||||
|
|
Loading…
Add table
Reference in a new issue