mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 19:57:45 +03:00
FileManager: Realize the initial path when opened from the command line
This commit is contained in:
parent
b2b30567ab
commit
06c478852a
Notes:
sideshowbarker
2024-07-19 07:08:59 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/06c478852a1
@ -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…
Reference in New Issue
Block a user