mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
gst/gstregistrybinary.c: In win32 codepath, if we fail to write the registry, create the directory for it and try aga...
Original commit message from CVS: * gst/gstregistrybinary.c: In win32 codepath, if we fail to write the registry, create the directory for it and try again, matching the behaviour in non-win32 codepaths.
This commit is contained in:
parent
94752eaefd
commit
8b1ed490b3
2 changed files with 21 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2008-11-20 Michael Smith <msmith@songbirdnest.com>
|
||||
|
||||
* gst/gstregistrybinary.c:
|
||||
In win32 codepath, if we fail to write the registry, create the
|
||||
directory for it and try again, matching the behaviour in non-win32
|
||||
codepaths.
|
||||
|
||||
2008-11-20 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* libs/gst/base/gstbasesink.c: (gst_base_sink_set_render_delay):
|
||||
|
|
|
@ -132,12 +132,24 @@ gst_registry_binary_cache_finish (GstRegistry * registry,
|
|||
{
|
||||
gboolean ret = TRUE;
|
||||
GError *error = NULL;
|
||||
if (!g_file_set_contents (cache->location, (const gchar *) cache->mem,
|
||||
cache->len, &error)) {
|
||||
/* Probably the directory didn't exist; create it */
|
||||
gchar *dir;
|
||||
dir = g_path_get_dirname (cache->location);
|
||||
g_mkdir_with_parents (dir, 0777);
|
||||
g_free (dir);
|
||||
|
||||
g_error_free (error);
|
||||
error = NULL;
|
||||
|
||||
if (!g_file_set_contents (cache->location, (const gchar *) cache->mem,
|
||||
cache->len, &error)) {
|
||||
GST_ERROR ("Failed to write to cache file: %s", error->message);
|
||||
g_error_free (error);
|
||||
ret = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
g_free (cache->mem);
|
||||
g_free (cache);
|
||||
|
|
Loading…
Reference in a new issue