Re: allow slashes in .desktop file names
- From: Frederic Crozat <fcrozat mandrakesoft com>
- To: Nautilus List <nautilus-list gnome org>
- Subject: Re: allow slashes in .desktop file names
- Date: 19 Jul 2002 17:27:39 +0200
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..)
--
Frédéric Crozat
MandrakeSoft
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]