Re: [Fwd: Re: allow slashes in .desktop file names]



On 19 Jul 2002, Bastien Nocera wrote:

> On Fri, 2002-07-19 at 16:33, Frederic Crozat wrote:
> > Le ven 19/07/2002 à 17:19, Bastien Nocera a écrit :
> > > Heya,
> > > 
> > > Trying to rename a .desktop file's name to something that contains a '/'
> > > doesn't work currently. Here's a patch to special-case .desktop files.
> > 
> > 
> > > Index: nautilus-file.c
> > > ===================================================================
> > > RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-file.c,v
> > > retrieving revision 1.294
> > > diff -u -r1.294 nautilus-file.c
> > > --- nautilus-file.c	2 Jul 2002 20:40:34 -0000	1.294
> > > +++ nautilus-file.c	19 Jul 2002 15:12:32 -0000
> > > @@ -981,8 +981,9 @@
> > >  	g_return_if_fail (new_name != NULL);
> > >  	g_return_if_fail (callback != NULL);
> > >  
> > > -	/* Return an error for incoming names containing path separators. */
> > > -	if (strstr (new_name, "/") != NULL) {
> > > +	/* Return an error for incoming names containing path separators.
> > > +	 * But not for .desktop files as '/' are allowed for them */
> > > +	if (strstr (new_name, "/") != NULL && (nautilus_file_is_mime_type (file, "application/x-gnome-app-info") == FALSE)) {
> > 
> > You should also test for "application/x-desktop", new .desktop files are
> > seen like that.. (Fixed a bug in gnome-panel with the same problem..)
> 
> Fixed in attached patch.

There were further issues, but i've checked in the fix now.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a lonely vegetarian filmmaker with acid for blood. She's an orphaned 
hip-hop hooker with an evil twin sister. They fight crime! 




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]