[glib] docs: better documentation for g_file_info_copy_into()



commit 95dd373024901afdf31c020a2cc7966032b18866
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Wed Apr 15 14:28:05 2015 +0200

    docs: better documentation for g_file_info_copy_into()
    
    The documentation of g_file_info_copy_into() was misleading. The
    attributes are not just copied, @dest_info is also cleared at the
    beginning. So any previously set attributes in @dest_info are lost.
    
    There was a bug in gedit about this function, where some metadata were
    not saved. So it might make sense to change the implementation to not
    clear @dest_info, and copy one by one the attributes from @src_info to
    @dest_info.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=747927

 gio/gfileinfo.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c
index 15abe79..b8e3179 100644
--- a/gio/gfileinfo.c
+++ b/gio/gfileinfo.c
@@ -365,8 +365,8 @@ g_file_info_new (void)
  * @src_info: source to copy attributes from.
  * @dest_info: destination to copy attributes to.
  *
- * Copies all of the [GFileAttribute][gio-GFileAttribute]
- * from @src_info to @dest_info.
+ * First clears all of the [GFileAttribute][gio-GFileAttribute] of @dest_info,
+ * and then copies all of the file attributes from @src_info to @dest_info.
  **/
 void
 g_file_info_copy_into (GFileInfo *src_info,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]