From 06c478852a1f1752d629dd058201d0b395dad78b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 30 Apr 2020 22:38:03 +0200 Subject: [PATCH] FileManager: Realize the initial path when opened from the command line --- Applications/FileManager/main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Applications/FileManager/main.cpp b/Applications/FileManager/main.cpp index 114e5df316..39647ea6f1 100644 --- a/Applications/FileManager/main.cpp +++ b/Applications/FileManager/main.cpp @@ -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();