mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
LibGUI: Don't try to get link target value if read_link failed
This commit is contained in:
parent
7c91fda088
commit
a4639fced9
Notes:
sideshowbarker
2024-07-17 11:48:24 +09:00
Author: https://github.com/2xsaiko 🔰
Commit: a4639fced9
Pull-request: https://github.com/SerenityOS/serenity/pull/13406
1 changed files with 5 additions and 4 deletions
|
@ -64,10 +64,11 @@ bool FileSystemModel::Node::fetch_data(String const& full_path, bool is_root)
|
|||
auto sym_link_target_or_error = Core::File::read_link(full_path);
|
||||
if (sym_link_target_or_error.is_error())
|
||||
perror("readlink");
|
||||
|
||||
symlink_target = sym_link_target_or_error.release_value();
|
||||
if (symlink_target.is_null())
|
||||
perror("readlink");
|
||||
else {
|
||||
symlink_target = sym_link_target_or_error.release_value();
|
||||
if (symlink_target.is_null())
|
||||
perror("readlink");
|
||||
}
|
||||
}
|
||||
|
||||
if (S_ISDIR(mode)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue