Skip to content

Commit 77e9fc6

Browse files
authored
Merge pull request #596 from bytedance/fix-mount-dir
fix resolve mount path when not as link
2 parents c898933 + b37f244 commit 77e9fc6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

rasp/librasp/src/comm.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,12 @@ fn resolve_mount_path(path: String, pid: i32) -> String {
314314
if find_path.exists() {
315315
if let Ok(subfix_path) = current_path.strip_prefix(find_path) {
316316
let parent_resolve = resolve_symlink_path(find_path.to_string_lossy().into_owned());
317-
return format!("{}/{}", parent_resolve, subfix_path.display());
317+
if parent_resolve == find_path.to_string_lossy().into_owned() {
318+
return path;
319+
}
320+
else {
321+
return format!("{}/{}", parent_resolve, subfix_path.display());
322+
}
318323
}
319324
}
320325
path

0 commit comments

Comments
 (0)