mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 20:17:13 +02:00
Kernel: Fix regression in VFS::symlink
The create_child method should be called with basename, not the full linkpath.
This commit is contained in:
committed by
Andreas Kling
parent
502436f9fc
commit
8a295299f3
Notes:
sideshowbarker
2024-07-18 10:22:27 +09:00
Author: https://github.com/MaxWipfli Commit: https://github.com/SerenityOS/serenity/commit/8a295299f35 Pull-request: https://github.com/SerenityOS/serenity/pull/8466
@@ -713,8 +713,8 @@ KResult VFS::symlink(StringView target, StringView linkpath, Custody& base)
|
||||
return EROFS;
|
||||
|
||||
auto basename = LexicalPath::basename(linkpath);
|
||||
dbgln_if(VFS_DEBUG, "VFS::symlink: '{}' (-> '{}') in {}", linkpath, target, parent_inode.identifier());
|
||||
auto inode_or_error = parent_inode.create_child(linkpath, S_IFLNK | 0644, 0, current_process->euid(), current_process->egid());
|
||||
dbgln_if(VFS_DEBUG, "VFS::symlink: '{}' (-> '{}') in {}", basename, target, parent_inode.identifier());
|
||||
auto inode_or_error = parent_inode.create_child(basename, S_IFLNK | 0644, 0, current_process->euid(), current_process->egid());
|
||||
if (inode_or_error.is_error())
|
||||
return inode_or_error.error();
|
||||
auto& inode = inode_or_error.value();
|
||||
|
||||
Reference in New Issue
Block a user