summaryrefslogtreecommitdiff
path: root/gst/gstregistry.c
diff options
context:
space:
mode:
authorPhilippe Normand <pnormand@igalia.com>2011-04-29 13:43:07 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2011-05-03 09:43:22 +0200
commit4e36f93924cf984d7ff1ab28e290ab9893464ad2 (patch)
tree088a83e9263969e5bd28a9882acfc7b8c24d917e /gst/gstregistry.c
parent5fe9bcd989cdfb4d540baab90cad32c5b4873752 (diff)
core: store presets, registry and plugins in XDG directories.
Presets and plugins moved to $XDG_DATA_HOME/gstreamer-0.11/ root directory. Registry moved to $XDG_CACHE_HOME/gstreamer-0.11/. Fixes bug #518597.
Diffstat (limited to 'gst/gstregistry.c')
-rw-r--r--gst/gstregistry.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gst/gstregistry.c b/gst/gstregistry.c
index 5b6df92f3..96cb41511 100644
--- a/gst/gstregistry.c
+++ b/gst/gstregistry.c
@@ -1509,8 +1509,9 @@ scan_and_update_registry (GstRegistry * default_registry,
/* plugins in the user's home directory take precedence over
* system-installed ones */
- home_plugins = g_build_filename (g_get_home_dir (),
- ".gstreamer-" GST_MAJORMINOR, "plugins", NULL);
+ home_plugins = g_build_filename (g_get_user_data_dir (),
+ "gstreamer-" GST_MAJORMINOR, "plugins", NULL);
+
GST_DEBUG ("scanning home plugins %s", home_plugins);
changed |= gst_registry_scan_path_internal (&context, home_plugins);
g_free (home_plugins);
@@ -1589,8 +1590,8 @@ ensure_current_registry (GError ** error)
default_registry = gst_registry_get_default ();
registry_file = g_strdup (g_getenv ("GST_REGISTRY"));
if (registry_file == NULL) {
- registry_file = g_build_filename (g_get_home_dir (),
- ".gstreamer-" GST_MAJORMINOR, "registry." HOST_CPU ".bin", NULL);
+ registry_file = g_build_filename (g_get_user_cache_dir (),
+ "gstreamer-" GST_MAJORMINOR, "registry." HOST_CPU ".bin", NULL);
}
if (!_gst_disable_registry_cache) {