mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
Assistant: Change to home directory when spawning applications
When launching Terminal via Taskbar we change to the users home directory. For consistency, let's also `chdir` to `/home/anon` when launching apps via Assistant's AppProvider.
This commit is contained in:
parent
acd2604a31
commit
609a0aa75d
Notes:
sideshowbarker
2024-07-18 11:07:53 +09:00
Author: https://github.com/SpencerCDixon Commit: https://github.com/SerenityOS/serenity/commit/609a0aa75d9 Pull-request: https://github.com/SerenityOS/serenity/pull/8374 Issue: https://github.com/SerenityOS/serenity/issues/8369
@ -6,17 +6,24 @@
|
||||
|
||||
#include "Providers.h"
|
||||
#include "FuzzyMatch.h"
|
||||
#include <LibCore/StandardPaths.h>
|
||||
#include <LibGUI/Clipboard.h>
|
||||
#include <LibGUI/FileIconProvider.h>
|
||||
#include <LibJS/Interpreter.h>
|
||||
#include <LibJS/Lexer.h>
|
||||
#include <LibJS/Parser.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <unistd.h>
|
||||
|
||||
namespace Assistant {
|
||||
|
||||
void AppResult::activate() const
|
||||
{
|
||||
if (chdir(Core::StandardPaths::home_directory().characters()) < 0) {
|
||||
perror("chdir");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
m_app_file->spawn();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user