don't fail if the destination files already exist and the user tries to
2008-09-18 Jens Granseuer <jensgr@gmx.net> * theme-save.c: (write_theme_to_disk): don't fail if the destination files already exist and the user tries to overwrite them (bug #552671) svn path=/trunk/; revision=8972
This commit is contained in:
parent
e218119145
commit
77134e824c
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2008-09-18 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
|
* theme-save.c: (write_theme_to_disk): don't fail if the destination
|
||||||
|
files already exist and the user tries to overwrite them (bug #552671)
|
||||||
|
|
||||||
2008-08-22 Jens Granseuer <jensgr@gmx.net>
|
2008-08-22 Jens Granseuer <jensgr@gmx.net>
|
||||||
|
|
||||||
* appearance-style.c: (conv_to_widget_cb), (create_thumbnail),
|
* appearance-style.c: (conv_to_widget_cb), (create_thumbnail),
|
||||||
|
|
|
@ -204,7 +204,7 @@ write_theme_to_disk (GnomeThemeMetaInfo *theme_info,
|
||||||
theme_info->metacity_theme_name,
|
theme_info->metacity_theme_name,
|
||||||
theme_info->icon_theme_name);
|
theme_info->icon_theme_name);
|
||||||
|
|
||||||
output = G_OUTPUT_STREAM (g_file_create (tmp_file, G_FILE_CREATE_NONE, NULL, NULL));
|
output = G_OUTPUT_STREAM (g_file_replace (tmp_file, NULL, FALSE, G_FILE_CREATE_NONE, NULL, NULL));
|
||||||
g_output_stream_write (output, str, strlen (str), NULL, NULL);
|
g_output_stream_write (output, str, strlen (str), NULL, NULL);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ write_theme_to_disk (GnomeThemeMetaInfo *theme_info,
|
||||||
g_object_unref (client);
|
g_object_unref (client);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_file_move (tmp_file, target_file, G_FILE_COPY_NONE, NULL, NULL, NULL, NULL);
|
g_file_move (tmp_file, target_file, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, NULL);
|
||||||
g_output_stream_close (output, NULL, NULL);
|
g_output_stream_close (output, NULL, NULL);
|
||||||
|
|
||||||
g_object_unref (tmp_file);
|
g_object_unref (tmp_file);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue