mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
FileManager: Make DirectoryView open links in their real directory
Previously it was possible to open a link like /home/anon/Desktop/Home, leading to a folder with the same name. Now it correctly opens its real path, which is /home/anon FileManager: Use Core::File::real_path_for to get real path of links
This commit is contained in:
parent
f8d643284e
commit
509e39ac00
2 changed files with 6 additions and 5 deletions
|
@ -114,9 +114,7 @@ int main(int argc, char** argv)
|
|||
String initial_location;
|
||||
|
||||
if (argc >= 2) {
|
||||
char* buffer = realpath(argv[1], nullptr);
|
||||
initial_location = buffer;
|
||||
free(buffer);
|
||||
initial_location = Core::File::real_path_for(argv[1]);
|
||||
}
|
||||
|
||||
if (initial_location.is_empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue