mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
ls: Use Core::File::real_path_for()
This commit is contained in:
parent
c943ca95c4
commit
137237b9c2
1 changed files with 3 additions and 3 deletions
|
@ -190,9 +190,9 @@ static String& hostname()
|
||||||
static size_t print_name(const struct stat& st, const String& name, const char* path_for_link_resolution, const char* path_for_hyperlink)
|
static size_t print_name(const struct stat& st, const String& name, const char* path_for_link_resolution, const char* path_for_hyperlink)
|
||||||
{
|
{
|
||||||
if (!flag_disable_hyperlinks) {
|
if (!flag_disable_hyperlinks) {
|
||||||
if (auto* full_path = realpath(path_for_hyperlink, nullptr)) {
|
auto full_path = Core::File::real_path_for(path_for_hyperlink);
|
||||||
printf("\033]8;;file://%s%s\033\\", hostname().characters(), full_path);
|
if (!full_path.is_null()) {
|
||||||
free(full_path);
|
out("\033]8;;file://{}{}\033\\", hostname(), full_path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue