jimevins / glabels

gLabels Label Designer
http://glabels.org
GNU General Public License v3.0
66 stars 25 forks source link

Template designer silently fails to save template if part number contains slash (/) #48

Open sam-hobbs opened 5 years ago

sam-hobbs commented 5 years ago

I tried several times to create a template for a Labelplanet LP6/99, and no template was created even though no errors were shown in the program. I tried again with the part number "LP699" instead of "LP6/99" and the template was created successfully.

Can you confirm that the slash in the part number was the cause of the error? I think it was the only difference in input between the attempts I made.

I'm running glabels3 on KDE Neon (ubuntu 18.04 base)

sam@T440s:~$ apt show glabels
Package: glabels
Version: 3.4.0-2build2
Priority: optional
Section: universe/gnome
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Jakob Haufe <sur5r@sur5r.net>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 1,417 kB
Provides: libglabels5
Pre-Depends: dpkg (>= 1.15.6~)
Depends: glabels-data (= 3.4.0-2build2), libc6 (>= 2.14), libcairo2 (>= 1.10.0), libebook-1.2-19 (>= 3.17), libebook-contacts-1.2-2 (>= 3.16.2), libedataserver-1.2-23 (>= 3.17), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.37.3), libgtk-3-0 (>= 3.0.9), libiec16022-0, libpango-1.0-0 (>= 1.28.1), libpangocairo-1.0-0 (>= 1.28.1), libqrencode3 (>= 3.2.0), librsvg2-2 (>= 2.32.0), libxml2 (>= 2.7.4)
Recommends: evince | atril
Suggests: evolution-data-server
Homepage: http://glabels.org/
Download-Size: 312 kB
APT-Manual-Installed: yes
APT-Sources: http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
Description: label, business card and media cover creation program for GNOME

Thanks for the program!

sur5r commented 5 years ago

I think this stems from https://github.com/jimevins/glabels/blob/master/libglabels/lgl-db.c#L1525. Maybe it would make sense to insert a call to g_strcanon to restrict the characters that end up in the file name.