1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

Applications: Open folder with pre-selected file where appropriate :^)

This commit is contained in:
speles 2021-03-01 23:27:37 +02:00 committed by Andreas Kling
parent 50de653cc9
commit 6e16a5cdfa
4 changed files with 10 additions and 7 deletions

View file

@ -113,8 +113,7 @@ PropertiesWindow::PropertiesWindow(const String& path, bool disable_rename, Wind
auto properties = Vector<PropertyValuePair>();
properties.append({ "Type:", get_description(m_mode) });
auto parent_link = URL::create_with_file_protocol(m_parent_path);
parent_link.set_fragment(m_name);
auto parent_link = URL::create_with_file_protocol(m_parent_path, m_name);
properties.append(PropertyValuePair { "Location:", path, Optional(parent_link) });
if (S_ISLNK(m_mode)) {
@ -124,7 +123,7 @@ PropertiesWindow::PropertiesWindow(const String& path, bool disable_rename, Wind
} else {
auto link_directory = LexicalPath(link_destination);
VERIFY(link_directory.is_valid());
auto link_parent = URL::create_with_file_protocol(link_directory.dirname());
auto link_parent = URL::create_with_file_protocol(link_directory.dirname(), link_directory.basename());
properties.append({ "Link target:", link_destination, Optional(link_parent) });
}
}