mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roman Zippel <zippel@linux-m68k.org>
To: Romain Lievin <romain@rlievin.dyndns.org>
Cc: Ozan Eren Bilgen <oebilgen@uekae.tubitak.gov.tr>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] "gconfig" removed root folder...
Date: Fri, 16 Jan 2004 22:56:01 +0100 (CET)	[thread overview]
Message-ID: <Pine.LNX.4.58.0401162249560.2530@serv> (raw)
In-Reply-To: <20040115214416.GA25409@rlievin.dyndns.org>

Hi,

On Thu, 15 Jan 2004, Romain Lievin wrote:

>  	fn = gtk_file_selection_get_filename(GTK_FILE_SELECTION
>  					     (user_data));
> +
> +	/* protect against 'root directory' bug */
> +	trailing = fn[strlen(fn)-1];
> +	if(stat(fn, &sb) == -1) return;
> +	if(S_ISDIR(sb.st_mode))
> +		if(trailing != '/')
> +			strcat((char *)fn, "/");
>
>  	if (conf_write(fn))
>  		text_insert_msg("Error", "Unable to save configuration !");

Um, I thought gtk++ also had an option that prevents the selection of
directories.
A test like this should be added to conf_write().

bye, Roman

  parent reply	other threads:[~2004-01-16 22:11 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-15 14:36 True story: " Ozan Eren Bilgen
2004-01-15 15:05 ` Roman Zippel
2004-01-15 15:20   ` Doug McNaught
2004-01-15 15:37     ` Erik Hensema
2004-01-15 16:07       ` Tim Cambrant
2004-01-15 16:17         ` Valdis.Kletnieks
2004-01-15 18:31           ` Tim Cambrant
2004-01-15 18:49             ` Valdis.Kletnieks
2004-01-15 19:00             ` Richard B. Johnson
2004-01-15 19:30               ` Valdis.Kletnieks
2004-01-15 19:48               ` Erik Hensema
2004-01-17 16:47       ` Alban Browaeys
2004-01-16 17:20     ` Max Valdez
2004-01-15 21:23   ` Romain Lievin
2004-01-15 21:46     ` Roman Zippel
2004-01-15 22:00       ` Andreas Tolfsen
2004-01-15 22:56         ` Roman Zippel
2004-01-16  6:39           ` Andreas Tolfsen
2004-01-16  7:43       ` Romain Lievin
2004-01-16 21:18         ` Doug McNaught
2004-01-16 21:44         ` Roman Zippel
2004-01-18 12:59           ` Romain Lievin
2004-01-15 15:40 ` viro
2004-01-15 16:01   ` Jan-Benedict Glaw
2004-01-15 21:05 ` Romain Lievin
2004-01-15 21:44 ` [PATCH] " Romain Lievin
2004-01-16 20:17   ` [PATCH] Bug in patch of Romain: " oebilgen
2004-01-16 20:32     ` [PATCH] Bug in patch of Romain: "gconfig" remo ved r=?iso-8859-9?Q?Romain: "gconfig" removed=A0root=A0folder..._?= (part 2) oebilgen
2004-01-16 21:56   ` Roman Zippel [this message]
     [not found]   ` <20040116161440.GC30349@louise.pinerecords.com>
2004-01-17 21:47     ` [PATCH] "gconfig" removed root folder Romain Lievin
2004-01-18  7:24       ` Tomas Szepe
2004-01-18 14:21 ` True story: " Romain Lievin
2004-01-18 14:32   ` Muli Ben-Yehuda
2004-01-21 19:54 ` [PATCH] " Romain Lievin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0401162249560.2530@serv \
    --to=zippel@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oebilgen@uekae.tubitak.gov.tr \
    --cc=romain@rlievin.dyndns.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome