Messages in this thread | | | Date | Fri, 16 Jan 2004 22:56:01 +0100 (CET) | From | Roman Zippel <> | Subject | Re: [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/
| |