Skip to content

Commit

Permalink
fix resolve mount path when not as link
Browse files Browse the repository at this point in the history
  • Loading branch information
yoloyyh committed Apr 6, 2024
1 parent c898933 commit b37f244
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rasp/librasp/src/comm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,12 @@ fn resolve_mount_path(path: String, pid: i32) -> String {
if find_path.exists() {
if let Ok(subfix_path) = current_path.strip_prefix(find_path) {
let parent_resolve = resolve_symlink_path(find_path.to_string_lossy().into_owned());
return format!("{}/{}", parent_resolve, subfix_path.display());
if parent_resolve == find_path.to_string_lossy().into_owned() {
return path;
}
else {
return format!("{}/{}", parent_resolve, subfix_path.display());
}
}
}
path
Expand Down

0 comments on commit b37f244

Please sign in to comment.