Fix menu generation some more.

Stop .desktop file processing when seeing a section other than [Desktop Entry].
The previous fix in this area didn't do it properly.

Noted by Len E.
This commit is contained in:
Kim Woelders 2013-10-05 11:16:27 +02:00
parent 6703ab1c59
commit 1922725db4
1 changed files with 3 additions and 2 deletions

View File

@ -197,8 +197,9 @@ sub ProcessFile {
open(FI,$f) or return;
while (<FI>) {
s/\s+$//;
if (/^\[Desktop\s+(\w+)/) {
last if ($1 ne "Entry");
if (/^\[(\w+)\s+(\w+)/) {
# Note: This breaks if [Desktop Entry] is not the first
last if (($1 ne "Desktop") or ($2 ne "Entry"));
} elsif (/^Name=(.*)$/) {
$Name = $1;
} elsif ($loc1 && /^Name\[$loc1\]=(.*)$/) {