lkml.org 
[lkml]   [2004]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] "gconfig" removed root folder...
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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.307 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site