1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

FileManager: Realize the initial path when opened from the command line

This commit is contained in:
Andreas Kling 2020-04-30 22:38:03 +02:00
parent b2b30567ab
commit 06c478852a

View file

@ -100,8 +100,11 @@ int main(int argc, char** argv)
// 3. the root directory
String initial_location;
if (argc >= 2)
initial_location = argv[1];
if (argc >= 2) {
char* buffer = realpath(argv[1], nullptr);
initial_location = buffer;
free(buffer);
}
if (initial_location.is_empty())
initial_location = Core::StandardPaths::home_directory();