site  contact  subhomenews

Optical disc now shows in drives menu

March 27, 2022 — BarryK

I reported this bug in Easy 3.4.4:

https://forum.puppylinux.com/viewtopic.php?p=53243#p53243

In JWM-mode icon-free-desktop, after I had plugged in a CD, it did not show in the drives menu. As I never use optical media, I hadn't noticed this bug.

The fix is in /usr/local/ui/jwm/generate-drives-menu, needs this extra code shown in bold:

for aF in `find /root/.pup_event -mindepth 1 -maxdepth 1 -name 'drive_*' | sort -V`
do
if [ -f ${aF}/info ];then
. ${aF}/info
#ex:
#PE_INFO='Filesystem: vfat Size: 639MB'
#PE_DRV_CATEGORY='usbdrv'
#PE_DRV_DESCRIPTION='SanDisk Extreme '
#PE_ONEDRVNAME='sdb1'
#PE_FSTYPE='vfat'
#PE_DRV_NAME='sdb'
#PE_SIZE='639MB'
if [ "$PE_ONEDRVNAME" == "$PE_DRV_NAME" ];then
#20220327 may be optical or floppy...
case "$PE_ONEDRVNAME" in
sr*|fd*) true ;;
*) continue ;; #not a partition
esac
fi
case "$PE_DRV_CATEGORY" in
usbdrv) DRVICON="usbdrv48.png" ;;
card) DRVICON="card48.png" ;;
floppy) DRVICON="floppy48.png" ;;
optical) DRVICON="optical48.png" ;;
*) DRVICON="drive48.png" ;;
esac

Onto the next buglet...    

Tags: easy