Closed artizirk closed 10 years ago
Hey @arti95, thanks for letting me know about the bug!
I pushed a fix which I tested it by adding a desktop file with the '
character in its filename to a folder category with a '
in its name, and all seemed to work well.
I'll leave this bug report up until you confirm that things are working well on your end too.
PS: I posted the fix along with a bunch of other updates I made recently, among them being changes to the command line option strings (I was getting annoyed with the 7 character "short form" chooser
for choose-remaining
, not to mention the general lack of standardization.)
In any case, the README, manpage and gnome-catgen -h
should all point to the new values. Let me know if you don't like the direction I went for those btw; if you have a better idea, I'm open to discuss.
Cheers!
Still broken on my end
I created a Test.category file under ~/.local/share/applications-categories/ with only "Garry's Mod.desktop" as content then ran ./gnome-catgen --set and now it throws unary operator expected error
‣ cat ~/.local/share/applications-categories/Test.category
Garry's Mod.desktop
‣ ./gnome-catgen --set
Applying current folder configuration...
Clearing old category data before populating folders
Evaluating: Test
./gnome-catgen: line 89: [: Garry's: unary operator expected
Done!
‣
Command-line interface itself is nicer now than it was before.
@arti95: Hey, I think your issue may be fixed thanks to some help from @meridius- I applied similar logic to a few other spots and caught some similar problems too, then made some additional tweaks so double and single quotes could be used simultaneously.
My test case was:
It seemed to work well for all the options-- let me know how it goes for you!
works now, thanks :)
@arti95: Sweet deal! Thanks for reporting and following up :)
Your issue actually got me considering what other scenarios might break things, and I discovered gnome-catgen wasn't very friendly towards the backslash character either, so I patched in support for that too. My latest working test case is:
Let me know if you find anything else, Cheers!
I discovered a few more strings that wouldn't work and fixed those too; the new test case is:
That little ' in the desktop file isn't escaped when reading .category file