From 64c7e79d2b41c7a24ad48381eae9be7f96d697dd Mon Sep 17 00:00:00 2001 From: xoffio <38369407+Xoffio@users.noreply.github.com> Date: Tue, 17 Dec 2024 22:57:47 -0500 Subject: [PATCH] trying to fix CI --- frida-gum/src/process.rs | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/frida-gum/src/process.rs b/frida-gum/src/process.rs index e877c02..644b403 100644 --- a/frida-gum/src/process.rs +++ b/frida-gum/src/process.rs @@ -99,41 +99,34 @@ impl<'a> Process<'a> { /// Returns a string specifying the filesystem path to the current working directory pub fn get_current_dir(&self) -> String { - let current_dir = unsafe { + unsafe { CStr::from_ptr(_frida_g_get_current_dir()) .to_string_lossy() .to_string() - }; - - current_dir + } } /// Returns a string specifying the filesystem path to the directory to use for temporary files pub fn get_tmp_dir(&self) -> String { - let tmp_dir = unsafe { + unsafe { CStr::from_ptr(_frida_g_get_tmp_dir()) .to_string_lossy() .to_string() - }; - - tmp_dir + } } /// Returns a string specifying the filesystem path to the current user’s home directory pub fn get_home_dir(&self) -> String { - let home_dir = unsafe { + unsafe { CStr::from_ptr(_frida_g_get_home_dir()) .to_string_lossy() .to_string() - }; - - home_dir + } } /// Get this thread’s OS-specific id as a number pub fn get_current_thread_id(&self) -> u64 { - let id = unsafe { gum_sys::gum_process_get_current_thread_id() }; - id + unsafe { gum_sys::gum_process_get_current_thread_id() } } /// Enumerates memory ranges satisfying `protection` given