Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. if !pathNfilename_abs.is_null() {
  2. let path = std::path::Path::new(
  3. std::ffi::CStr::from_ptr(pathNfilename_abs)
  4. .to_str()
  5. .unwrap(),
  6. );
  7. match fs::canonicalize(path) {
  8. Ok(v) => {
  9. return to_cstring(v.to_str().unwrap());
  10. }
  11. Err(e) => return 0 as *mut libc::c_char,
  12. }
  13. } else {
  14. pathNfilename_abs
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement