Ver código fonte

Assistant: Fix lockfile logic

Previously, Assistant was able to re-execute itself due to a quirk in
the global cursor tracking logic, it seems.

Now it has become necessary to explicitly drop the lockfile before
activating the new Assistant instance.

Alternatively, this has always been a latent bug that only now has
become more likely.
Ben Wiederhake 3 anos atrás
pai
commit
2f38cad987
1 arquivos alterados com 1 adições e 0 exclusões
  1. 1 0
      Userland/Applications/Assistant/main.cpp

+ 1 - 0
Userland/Applications/Assistant/main.cpp

@@ -244,6 +244,7 @@ int main(int argc, char** argv)
     text_box.on_return_pressed = [&]() {
     text_box.on_return_pressed = [&]() {
         if (!app_state.selected_index.has_value())
         if (!app_state.selected_index.has_value())
             return;
             return;
+        lockfile.release();
         app_state.results[app_state.selected_index.value()].activate();
         app_state.results[app_state.selected_index.value()].activate();
         GUI::Application::the()->quit();
         GUI::Application::the()->quit();
     };
     };