mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 01:00:05 +00: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: 06c478852a
1 changed files with 5 additions and 2 deletions
|
@ -100,8 +100,11 @@ int main(int argc, char** argv)
|
||||||
// 3. the root directory
|
// 3. the root directory
|
||||||
String initial_location;
|
String initial_location;
|
||||||
|
|
||||||
if (argc >= 2)
|
if (argc >= 2) {
|
||||||
initial_location = argv[1];
|
char* buffer = realpath(argv[1], nullptr);
|
||||||
|
initial_location = buffer;
|
||||||
|
free(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
if (initial_location.is_empty())
|
if (initial_location.is_empty())
|
||||||
initial_location = Core::StandardPaths::home_directory();
|
initial_location = Core::StandardPaths::home_directory();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue