summaryrefslogtreecommitdiff
path: root/Applications/FileManager
diff options
context:
space:
mode:
Diffstat (limited to 'Applications/FileManager')
-rw-r--r--Applications/FileManager/PropertiesDialog.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Applications/FileManager/PropertiesDialog.cpp b/Applications/FileManager/PropertiesDialog.cpp
index 8caa182dd5..4c2992b412 100644
--- a/Applications/FileManager/PropertiesDialog.cpp
+++ b/Applications/FileManager/PropertiesDialog.cpp
@@ -117,12 +117,11 @@ PropertiesDialog::PropertiesDialog(GUI::FileSystemModel& model, String path, boo
properties.append({ "Location:", path });
if (S_ISLNK(m_mode)) {
- char link_destination[PATH_MAX];
- ssize_t len = readlink(path.characters(), link_destination, sizeof(link_destination));
- if (len < 0) {
+ auto link_destination = Core::File::read_link(path);
+ if (link_destination.is_null()) {
perror("readlink");
} else {
- properties.append({ "Link target:", String(link_destination, len) });
+ properties.append({ "Link target:", link_destination });
}
}