summaryrefslogtreecommitdiff
path: root/Applications
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-30 22:38:03 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-30 22:38:28 +0200
commit06c478852a1f1752d629dd058201d0b395dad78b (patch)
tree386c70d1ff4f3063507104876e95a988bbb7b5a3 /Applications
parentb2b30567ab2561df531fca8399472bb358eaab31 (diff)
downloadserenity-06c478852a1f1752d629dd058201d0b395dad78b.zip
FileManager: Realize the initial path when opened from the command line
Diffstat (limited to 'Applications')
-rw-r--r--Applications/FileManager/main.cpp7
1 files 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();