summarylogtreecommitdiffstats
path: root/0002-Stop-looking-for-modules-in-cwd.patch
blob: db2a2fcfc793458b58cc1cfd0880bc155bd22537 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Matthias Clasen <mclasen@redhat.com>
Date: Sat, 15 Jun 2024 14:18:01 -0400
Subject: [PATCH] Stop looking for modules in cwd

This is just not a good idea. It is surprising, and can be misused.

Fixes: #6786
---
 gtk/gtkmodules.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/gtk/gtkmodules.c b/gtk/gtkmodules.c
index 50729b61a590..c0f0c30a2148 100644
--- a/gtk/gtkmodules.c
+++ b/gtk/gtkmodules.c
@@ -229,13 +229,8 @@ find_module (const gchar *name)
   gchar *module_name;
 
   module_name = _gtk_find_module (name, "modules");
-  if (!module_name)
-    {
-      /* As last resort, try loading without an absolute path (using system
-       * library path)
-       */
-      module_name = g_module_build_path (NULL, name);
-    }
+  if (module_name == NULL)
+    return NULL;
 
   module = g_module_open (module_name, G_MODULE_BIND_LOCAL | G_MODULE_BIND_LAZY);