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:
parent
b2b30567ab
commit
06c478852a
1 changed files with 5 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue