1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 08:38:12 +00:00

LibCore: Add StandardPaths thing to retrieve various standard locations

Fixes #1853.
This commit is contained in:
Andreas Kling 2020-04-19 19:57:05 +02:00
parent 3b434068eb
commit c45e16f605
10 changed files with 51 additions and 25 deletions

View file

@ -28,7 +28,7 @@
#include "TaskbarButton.h"
#include <AK/SharedBuffer.h>
#include <LibCore/ConfigFile.h>
#include <LibCore/UserInfo.h>
#include <LibCore/StandardPaths.h>
#include <LibGUI/BoxLayout.h>
#include <LibGUI/Button.h>
#include <LibGUI/Desktop.h>
@ -105,7 +105,7 @@ void TaskbarWindow::create_quick_launch_bar()
if (pid < 0) {
perror("fork");
} else if (pid == 0) {
if (chdir(get_current_user_home_path().characters()) < 0) {
if (chdir(Core::StandardPaths::home_directory().characters()) < 0) {
perror("chdir");
exit(1);
}