diff options
author | Corey Berla <corey@berla.me> | 2022-04-04 17:41:25 -0700 |
---|---|---|
committer | António Fernandes <antoniojpfernandes@gmail.com> | 2022-05-11 00:03:27 +0000 |
commit | 8ee894fb4dd5df633f614d37f357c588b91c51f4 (patch) | |
tree | 4a604f851f49408a46164e60765519d0a39a3d26 | |
parent | b2e3d3757d23bedf1ecada987c97a54e3ae78b6f (diff) | |
download | nautilus-8ee894fb4dd5df633f614d37f357c588b91c51f4.tar.gz |
window: Fix crash when opening new window from pathbar
Changes as part of commit 022867e3d3370560f2c6c07f90ad5fdfd7916d50
switched the handler of the pathbar signal.
The new handler raises an exception for NAUTILUS_OPEN_FLAG_NEW_WINDOW.
Use nautilus_application API should be used when handling new windows.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2208
(cherry picked from commit 493deebd50409e869a1a45d745ed46c991e4741f)
-rw-r--r-- | src/nautilus-window.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nautilus-window.c b/src/nautilus-window.c index f92858bdf..0d01e7132 100644 --- a/src/nautilus-window.c +++ b/src/nautilus-window.c @@ -1753,7 +1753,15 @@ on_path_bar_open_location (NautilusWindow *window, GFile *location, NautilusOpenFlags open_flags) { - nautilus_window_open_location_full (window, location, open_flags, NULL, NULL); + if (open_flags & NAUTILUS_OPEN_FLAG_NEW_WINDOW) + { + nautilus_application_open_location_full (NAUTILUS_APPLICATION (g_application_get_default ()), + location, NAUTILUS_OPEN_FLAG_NEW_WINDOW, NULL, NULL, NULL); + } + else + { + nautilus_window_open_location_full (window, location, open_flags, NULL, NULL); + } } static void |