We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d7dcfc7 commit 64c82bcCopy full SHA for 64c82bc
kernel/src/filesystem/vfs/utils.rs
@@ -45,7 +45,7 @@ pub fn user_path_at(
45
let mut inode = ROOT_INODE();
46
let ret_path;
47
// 如果path不是绝对路径,则需要拼接
48
- if path.as_bytes()[0] != b'/' {
+ if path.is_empty() || path.as_bytes()[0] != b'/' {
49
// 如果dirfd不是AT_FDCWD,则需要检查dirfd是否是目录
50
if dirfd != AtFlags::AT_FDCWD.bits() {
51
let binding = pcb.fd_table();
0 commit comments