1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:37:35 +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:
DragonAlex98 2021-01-24 00:43:33 +01:00 committed by Andreas Kling
parent f8d643284e
commit 509e39ac00
2 changed files with 6 additions and 5 deletions

View file

@ -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())