Skip to content

Truly independent web browser

LibWebCommon: Stop loading resources from ~/.lagom

Andreas Kling003c8fdeb9bf
diff --git a/Libraries/LibWebCommon/CMakeLists.txt b/Libraries/LibWebCommon/CMakeLists.txt
index 8af450f1c48..9e437ef5817 100644
--- a/Libraries/LibWebCommon/CMakeLists.txt
+++ b/Libraries/LibWebCommon/CMakeLists.txt
@@ -167,7 +167,7 @@ endif()
ladybird_lib(LibWebCommon webcommon EXPLICIT_SYMBOL_EXPORT)
# NB: The enumerations of LibWeb's IDL modules are generated into LibWebCommon along with LibWeb's bindings.
add_dependencies(LibWebCommon generate_bindings)
-target_link_libraries(LibWebCommon PRIVATE LibCore LibCrypto LibFileSystem LibGfx LibHTTP LibIPC LibRequests LibURL)
+target_link_libraries(LibWebCommon PRIVATE LibCore LibCrypto LibGfx LibHTTP LibIPC LibRequests LibURL)
import_rust_crate(MANIFEST_PATH Rust/Cargo.toml CRATE_NAME libwebcommon_rust FEATURES allocator FFI_HEADER RustFFI.h)
target_link_libraries(LibWebCommon PRIVATE libwebcommon_rust)
diff --git a/Libraries/LibWebCommon/WebView/Utilities.cpp b/Libraries/LibWebCommon/WebView/Utilities.cpp
index eb9a38dd105..aee32f1e715 100644
--- a/Libraries/LibWebCommon/WebView/Utilities.cpp
+++ b/Libraries/LibWebCommon/WebView/Utilities.cpp
@@ -7,12 +7,10 @@
#include <AK/LexicalPath.h>
#include <AK/Platform.h>
-#include <LibCore/Environment.h>
#include <LibCore/Process.h>
#include <LibCore/Resource.h>
#include <LibCore/ResourceImplementationFile.h>
#include <LibCore/System.h>
-#include <LibFileSystem/FileSystem.h>
#include <LibURL/URL.h>
#include <LibWebCommon/WebView/Utilities.h>
@@ -76,13 +74,6 @@ void platform_init(Optional<ByteString> ladybird_binary_path)
s_ladybird_binary_path = move(ladybird_binary_path);
s_ladybird_resource_root = [] {
- auto home = Core::Environment::get("XDG_CONFIG_HOME"sv)
- .value_or_lazy_evaluated_optional([]() { return Core::Environment::get("HOME"sv); });
- if (home.has_value()) {
- auto home_lagom = ByteString::formatted("{}/.lagom", home);
- if (FileSystem::is_directory(home_lagom))
- return home_lagom;
- }
auto app_dir = MUST(application_directory());
#ifdef AK_OS_MACOS
return LexicalPath(app_dir).parent().append("Resources"sv).string();