Remove the registry before applying the new TMP file (for Windows)

Original commit message from CVS:
Remove the registry before applying the new TMP file (for Windows)
This commit is contained in:
Steve Lhomme 2004-07-24 10:43:57 +00:00
parent faf9cf5242
commit afef72241b
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2004-07-24 Steve Lhomme <steve.lhomme at free dot fr>
* gst/registries/gstxmlregistry.c:
Remove the registry before renaming the tempfile (needed for Windows)
2004-07-23 Zaheer Abbas Merali <zaheerabbas at merali dot org>
* gst/elements/gstmultifilesrc.c: (gst_multifilesrc_class_init),

View file

@ -631,8 +631,10 @@ gst_xml_registry_close_func (GstXMLRegistry * registry)
/* If we opened for writing, rename our temporary file. */
tmploc = g_strconcat (registry->location, ".tmp", NULL);
if (g_file_test (tmploc, G_FILE_TEST_EXISTS))
if (g_file_test (tmploc, G_FILE_TEST_EXISTS)) {
remove (registry->location);
rename (tmploc, registry->location);
}
g_free (tmploc);
registry->open = FALSE;