! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Duplicate emblems / last character removed from emblem paths
Status:
RESOLVED: FIXED

Comments

Description Einar Lielmanis 2011-01-23 21:52:08 CET
Thunar stores the emblem names incorrectly, cutting off the last character.

To reproduce:
1. create folders called "x1" and "x2".
2. rclick "x1", emblems, any emblem.
3. move up folder
4. return to folder

Expected: "x1" has an emblem, "x2" has no emblem;
Actual result: both folders have an emblem now.


/home/e/.cache/Thunar % tdbtool metafile.tdb  
tdb> dump

key 21 bytes
file:///home/e/temp/x
data 16 bytes
[000] 00 65 6D 62 6C 65 6D 2D  64 65 66 61 75 6C 74 00  .emblem- default

---
Arch Linux x86_64
% pacman -Q | grep -i thuna
thunar 1.2.0-1
thunar-archive-plugin 0.2.4-8
thunar-thumbnailers 0.4.1-3
thunar-vfs 1.2.0-2
Comment 1 Jannis Pohlmann editbugs 2011-01-24 18:58:07 CET
Fixed in master and in the xfce-4.8 branch.

commit c231b0f266ca52be057cac23dfef12d1c2995895
Author: Jannis Pohlmann <jannis@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.

Bug #7171

Reported by:
Einar Lielmanis
Reported on: 2011-01-23
Last modified on: 2011-01-24

People

Assignee:
Jannis Pohlmann
CC List:
0 users

Version

Attachments

Additional information