mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-08 14:16:47 +00:00
修复unlink、unlinkat系统调用的路径错误 (#892)
This commit is contained in:
parent
fe7d4d588c
commit
f4acaec4ea
@ -239,7 +239,7 @@ pub fn do_unlink_at(dirfd: i32, path: &str) -> Result<u64, SystemError> {
|
||||
return Err(SystemError::EPERM);
|
||||
}
|
||||
|
||||
let (filename, parent_path) = rsplit_path(path);
|
||||
let (filename, parent_path) = rsplit_path(&remain_path);
|
||||
// 查找父目录
|
||||
let parent_inode: Arc<dyn IndexNode> = inode_begin
|
||||
.lookup_follow_symlink(parent_path.unwrap_or("/"), VFS_MAX_FOLLOW_SYMLINK_TIMES)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user