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
Notes: sideshowbarker 2024-07-19 07:08:59 +09:00

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