[RFC] A trivial change for DESKTOP_ENTRIES
stephen at missouri.edu
Wed Jul 13 21:10:27 UTC 2011
On 07/13/2011 02:35 PM, Jung-uk Kim wrote:
> On Wednesday 13 July 2011 06:42 am, Matthias Andree wrote:
>> Am 13.07.2011 00:25, schrieb Jung-uk Kim:
>>> After I updated x11-wm/compiz, GNOME was not able to start the
>>> window manager. Basically, it complained that compiz-manager was
>>> not found. Then, I realized compiz-manager.desktop was
>>> automagically replaced by compizmanager.desktop. Now I tracked
>>> it down to this commit:
>>> Sat Nov 27 17:42:46 2010 UTC (7 months, 2 weeks ago) by pav
>>> - DESKTOP_ENTRIES: commandline is used to name installed .desktop
>>> file, this can lead to files containing whitespace and funny
>>> characters; thus strip all non-alphanumeric characters
>>> To me, it looks far too restrictive. At least, I'd like to allow
>>> '-' and '_'. Please see the attached patch.
>>> Any objections?
>> The dot should also be allowed, to cover the POSIX portable
>> filename character set altogether.
> I liked the idea first. Then, I realized that we have to add more
> sanity checks, e.g., ".", "..", ".foo", etc.
> Jung-uk Kim
The extra sanity check seems to add very little overhead:
if (echo "$$4" | grep "^\..*" > /dev/null) \
|| (echo "$$4" | grep [^[:alnum:]_.-]> /dev/null); then \
echo "blah blah"; \
And "." are very common in filenames.
More information about the freebsd-ports