Re: [PATCH] "gconfig" removed root folder...

From: Roman Zippel
Date: Fri Jan 16 2004 - 17:15:02 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/