mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
FileManager: Use the current directory as one of the initial locations
This change makes `cd /bin; FileManager` open the app in /bin.
This commit is contained in:
parent
35cc5b9873
commit
4988540cb1
Notes:
sideshowbarker
2024-07-19 17:20:47 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/4988540cb16 Pull-request: https://github.com/SerenityOS/serenity/pull/9179
@ -98,8 +98,9 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
// our initial location is defined as, in order of precedence:
|
// our initial location is defined as, in order of precedence:
|
||||||
// 1. the command-line path argument (e.g. FileManager /bin)
|
// 1. the command-line path argument (e.g. FileManager /bin)
|
||||||
// 2. the user's home directory
|
// 2. the current directory
|
||||||
// 3. the root directory
|
// 3. the user's home directory
|
||||||
|
// 4. the root directory
|
||||||
|
|
||||||
if (!initial_location.is_empty()) {
|
if (!initial_location.is_empty()) {
|
||||||
if (!ignore_path_resolution)
|
if (!ignore_path_resolution)
|
||||||
@ -109,6 +110,9 @@ int main(int argc, char** argv)
|
|||||||
is_selection_mode = true;
|
is_selection_mode = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (initial_location.is_empty())
|
||||||
|
initial_location = Core::File::current_working_directory();
|
||||||
|
|
||||||
if (initial_location.is_empty())
|
if (initial_location.is_empty())
|
||||||
initial_location = Core::StandardPaths::home_directory();
|
initial_location = Core::StandardPaths::home_directory();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user