Bug#930674: automatically generated menus prevent some applications from running
    E. Serradilla 
    eserradi at gmx.com
       
    Wed Jun 19 20:01:14 BST 2019
    
    
  
On 6/19/19 10:20 AM, Jeremy Sowden wrote:
[...]
> Clearly this is not what the code actually does.  The quick hack would
> be to change xdg_to_wm() to truncate the command-line at the first
> instance of white-space (which is what is done to derive (*wm)->Name
> from (*xdg)->Exec or (*xdg)->TryExec); the right thing to do would be to
> implement the FDO quoting rules first:
>
maybe something like this:
                 else /* (*xdg)->TryExec */
                         (*wm)->Name = wstrdup((*xdg)->TryExec);
-               p = strchr((*wm)->Name, ' ');
+               p = strchr((*wm)->Name, '%');
                 if (p)
                         *p = '\0';
         }
@@ -225,6 +225,11 @@
                 (*wm)->CmdLine = (*xdg)->Exec;
         else                                    /* (*xdg)->TryExec */
                 (*wm)->CmdLine = (*xdg)->TryExec;
+
+       p = strchr((*wm)->CmdLine, '%');
+       if (p)
+               *p = '\0';
+
         (*wm)->SubMenu = (*xdg)->Category;
         (*wm)->Flags = (*xdg)->Flags;
and then maybe first (*xdg)->TryExec than (*xdg)->Exec?
    
    
More information about the Pkg-wmaker-devel
mailing list