mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 14:14:45 +03:00
Kernel: Allow sys$rename() to rename symlinks
Previously, this syscall would try to rename the target of the link, not the link itself.
This commit is contained in:
parent
3499ac4b54
commit
ddaedbca87
Notes:
sideshowbarker
2024-07-19 00:33:47 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/ddaedbca878
@ -503,7 +503,7 @@ KResult VFS::chmod(StringView path, mode_t mode, Custody& base)
|
||||
KResult VFS::rename(StringView old_path, StringView new_path, Custody& base)
|
||||
{
|
||||
RefPtr<Custody> old_parent_custody;
|
||||
auto old_custody_or_error = resolve_path(old_path, base, &old_parent_custody);
|
||||
auto old_custody_or_error = resolve_path(old_path, base, &old_parent_custody, O_NOFOLLOW_NOERROR);
|
||||
if (old_custody_or_error.is_error())
|
||||
return old_custody_or_error.error();
|
||||
auto& old_custody = *old_custody_or_error.value();
|
||||
|
Loading…
Reference in New Issue
Block a user