[Xfce4-commits] <thunar:xfce-4.8> Fix truncated strings when loading and storing emblems (bug #7171).

Jannis Pohlmann noreply at xfce.org
Mon Jan 24 19:00:01 CET 2011


Updating branch refs/heads/xfce-4.8
         to 44f5f400ab884b2ff5a192a8cccafcdec0d96469 (commit)
       from 3f57e2b554f0d7ff0122d5e12968be1768b3f950 (commit)

commit 44f5f400ab884b2ff5a192a8cccafcdec0d96469
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Mon Jan 24 18:55:16 2011 +0100

    Fix truncated strings when loading and storing emblems (bug #7171).
    
    The last character of all key names was always left out when storing the
    key/value pair in the TDB file. As a consequence, two similarly named
    files (e.g. x1 and x2) were treated the same (x) and both were assigned
    the same emblems.

 NEWS                     |    4 ++++
 thunar/thunar-metafile.c |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index c998af2..a5ed67d 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+1.2.x
+=====
+- Fix truncated strings when loading and storing emblems (bug #7171).
+
 1.2.0
 =====
 - Properly try alternative names when creating links (bug #6867).
diff --git a/thunar/thunar-metafile.c b/thunar/thunar-metafile.c
index 1d49f1e..4221296 100644
--- a/thunar/thunar-metafile.c
+++ b/thunar/thunar-metafile.c
@@ -278,7 +278,7 @@ thunar_metafile_fetch (ThunarMetafile   *metafile,
 
   /* generate the key data */
   key_data.dptr = key_path;
-  key_data.dsize = key_size - 1;
+  key_data.dsize = key_size;
 
   /* release any earlier result data */
   if (G_LIKELY (metafile->data.dptr != NULL))
@@ -373,7 +373,7 @@ thunar_metafile_store (ThunarMetafile   *metafile,
 
   /* generate the key data */
   key_data.dptr = key_path;
-  key_data.dsize = key_size - 1;
+  key_data.dsize = key_size;
 
   /* fetch the current value for the key */
   value_data = thunar_metafile_read (metafile, key_data);



More information about the Xfce4-commits mailing list