(SP1) Fix for drive icon renaming

Forum member 'davesurrey' reported that when a desktop drive icon was renamed, say "sda1" to "flash", then a second icon with "sda1" title appeared. Rerwin looked in /sbin/pup_event_frontend_d, which is the daemon that manages the desktop icons, and modified 'ppPATTERN':

add_pinboard_func() { #needs ONEDRVNAME, DRV_CATEGORY, FSTYPE

#ppPATTERN=' label="'"$ONEDRVNAME"'"'
#v411 rerwin: avoid icon getting duplicated if it is renamed...
[ "`grep "$ppPATTERN" /root/Choices/ROX-Filer/PuppyPin`" != "" ] && return #precaution.
echo "<?xml version=\"1.0\"?>
<env:Envelope xmlns:env=\"http://www.w3.org/2001/12/soap-envelope\">
<env:Body xmlns=\"http://rox.sourceforge.net/SOAP/ROX-Filer\">
<Args>${DRV_CATEGORY} ${FSTYPE}</Args>
</env:Envelope>" | rox -R

The only slight modification I made to rerwin's fix was to put "<" on the end of ppPATTERN, so as to distinguish between something like "sda1" and "sda10".

Posted on 18 Oct 2008, 7:37


Posted on 22 Oct 2008, 6:12 by davesurrey
renaming drive icons
This works fine now on my test PC with all 11 partitions.
Thanks to you both.