diff options
-rw-r--r-- | Base/home/anon/.config/Browser.ini (renamed from Base/home/anon/Browser.ini) | 0 | ||||
-rw-r--r-- | Base/home/anon/.config/FileManager.ini (renamed from Base/home/anon/FileManager.ini) | 0 | ||||
-rw-r--r-- | Base/home/anon/.config/IRCClient.ini (renamed from Base/home/anon/IRCClient.ini) | 0 | ||||
-rw-r--r-- | Base/home/anon/.config/LaunchServer.ini (renamed from Base/home/anon/LaunchServer.ini) | 0 | ||||
-rw-r--r-- | Base/home/anon/.config/Taskbar.ini (renamed from Base/home/anon/Taskbar.ini) | 0 | ||||
-rw-r--r-- | Base/home/anon/.config/Terminal.ini (renamed from Base/home/anon/Terminal.ini) | 0 | ||||
-rw-r--r-- | Libraries/LibCore/ConfigFile.cpp | 4 | ||||
-rw-r--r-- | Libraries/LibCore/StandardPaths.cpp | 8 | ||||
-rw-r--r-- | Libraries/LibCore/StandardPaths.h | 1 |
9 files changed, 11 insertions, 2 deletions
diff --git a/Base/home/anon/Browser.ini b/Base/home/anon/.config/Browser.ini index f3211ec1d6..f3211ec1d6 100644 --- a/Base/home/anon/Browser.ini +++ b/Base/home/anon/.config/Browser.ini diff --git a/Base/home/anon/FileManager.ini b/Base/home/anon/.config/FileManager.ini index c0edb5457b..c0edb5457b 100644 --- a/Base/home/anon/FileManager.ini +++ b/Base/home/anon/.config/FileManager.ini diff --git a/Base/home/anon/IRCClient.ini b/Base/home/anon/.config/IRCClient.ini index a3db3a7723..a3db3a7723 100644 --- a/Base/home/anon/IRCClient.ini +++ b/Base/home/anon/.config/IRCClient.ini diff --git a/Base/home/anon/LaunchServer.ini b/Base/home/anon/.config/LaunchServer.ini index c1676d2387..c1676d2387 100644 --- a/Base/home/anon/LaunchServer.ini +++ b/Base/home/anon/.config/LaunchServer.ini diff --git a/Base/home/anon/Taskbar.ini b/Base/home/anon/.config/Taskbar.ini index b09d3559a7..b09d3559a7 100644 --- a/Base/home/anon/Taskbar.ini +++ b/Base/home/anon/.config/Taskbar.ini diff --git a/Base/home/anon/Terminal.ini b/Base/home/anon/.config/Terminal.ini index 577e2ba08f..577e2ba08f 100644 --- a/Base/home/anon/Terminal.ini +++ b/Base/home/anon/.config/Terminal.ini diff --git a/Libraries/LibCore/ConfigFile.cpp b/Libraries/LibCore/ConfigFile.cpp index dcc3591478..a36d99d3bd 100644 --- a/Libraries/LibCore/ConfigFile.cpp +++ b/Libraries/LibCore/ConfigFile.cpp @@ -36,8 +36,8 @@ namespace Core { NonnullRefPtr<ConfigFile> ConfigFile::get_for_app(const String& app_name) { - String home_path = StandardPaths::home_directory(); - auto path = String::format("%s/%s.ini", home_path.characters(), app_name.characters()); + String directory = StandardPaths::config_directory(); + auto path = String::format("%s/%s.ini", directory.characters(), app_name.characters()); return adopt(*new ConfigFile(path)); } diff --git a/Libraries/LibCore/StandardPaths.cpp b/Libraries/LibCore/StandardPaths.cpp index c73e16461b..3ed9197835 100644 --- a/Libraries/LibCore/StandardPaths.cpp +++ b/Libraries/LibCore/StandardPaths.cpp @@ -61,6 +61,14 @@ String StandardPaths::downloads_directory() return LexicalPath::canonicalized_path(builder.to_string()); } +String StandardPaths::config_directory() +{ + StringBuilder builder; + builder.append(home_directory()); + builder.append("/.config"); + return LexicalPath::canonicalized_path(builder.to_string()); +} + String StandardPaths::tempfile_directory() { return "/tmp"; diff --git a/Libraries/LibCore/StandardPaths.h b/Libraries/LibCore/StandardPaths.h index 30ebac7c27..51346250c2 100644 --- a/Libraries/LibCore/StandardPaths.h +++ b/Libraries/LibCore/StandardPaths.h @@ -36,6 +36,7 @@ public: static String desktop_directory(); static String downloads_directory(); static String tempfile_directory(); + static String config_directory(); }; } |