1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:07:47 +00:00

FileManager: Change the cwd when opening a directory

The `open()` function of DirectoryView should change the current working
directory, so that the "Go to Location" menu item can process relative
paths correctly. Update other functions in DirectoryView to use `open()`
when opening a directory.
This commit is contained in:
TheFightingCatfish 2021-08-11 23:43:52 +08:00 committed by Andreas Kling
parent ce66c40160
commit d2af27d2d0
3 changed files with 17 additions and 20 deletions

View file

@ -495,7 +495,8 @@ int run_in_windowed_mode(String initial_location, String entry_focused_on_init)
progressbar.set_frame_thickness(1);
location_textbox.on_return_pressed = [&] {
directory_view.open(location_textbox.text());
if (directory_view.open(location_textbox.text()))
location_textbox.set_focus(false);
};
auto refresh_tree_view = [&] {