RE: [Anjuta-list] Not a regular file?
- From: Dan Elphick <dre00r ecs soton ac uk>
- To: "Levi, Segev" <Segev Levi comverse com>
- Cc: "'Biswapesh Chattopadhyay'" <biswapesh_chatterjee tcscal co in>, Andy Piper <andy piper freeuk com>, Anjuta List <anjuta-list lists sourceforge net>
- Subject: RE: [Anjuta-list] Not a regular file?
- Date: Mon Feb 18 08:23:05 2002
Think I've found the cause of the 'not a regular file' error when
importing. The attached patch should fix this as well removing a
redundant memory allocation.
(The problem occurs because set_file_selection modifies file_list,
corrupting path)
--
Dan Elphick
High Performance Computing Group
Department of Electronics and Computer Science
Southampton University
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/anjuta/ChangeLog,v
retrieving revision 1.236
diff -u -r1.236 ChangeLog
--- ChangeLog 2002/02/18 09:10:15 1.236
+++ ChangeLog 2002/02/18 16:13:46
@@ -1,3 +1,9 @@
+2002-02-18 Dan Elphick <dre00r ecs soton ac uk>
+
+ * widgets/gnomefilelist.c:
+ Fixed gnome_filelist_get_lastfilename so it no longer returns
+ a corrupted path.
+
2002-02-18 Naba Kumar <kh_naba users sourceforge net>
* src/anjuta.c, main.c:
Index: widgets/gnomefilelist.c
===================================================================
RCS file: /cvs/gnome/anjuta/widgets/gnomefilelist.c,v
retrieving revision 1.15
diff -u -r1.15 gnomefilelist.c
--- widgets/gnomefilelist.c 2002/02/17 18:44:05 1.15
+++ widgets/gnomefilelist.c 2002/02/18 16:01:44
@@ -875,25 +875,22 @@
gchar * gnome_filelist_get_lastfilename(GnomeFileList * file_list, GList * list)
{
GtkCTreeNode * node = g_list_nth_data(list, 0);
- gchar * filename = NULL;
gchar * text = NULL;
gchar * full = NULL;
gchar * path;
if(!gtk_ctree_node_get_pixtext(GTK_CTREE(file_list->file_list), node, 0, &text, NULL, NULL, NULL))
return NULL;
- filename = g_strdup(text);
gtk_ctree_select(GTK_CTREE(file_list->file_list), node);
path = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(file_list->history_combo)->entry));
if(!path)
return NULL;
+ full = g_strconcat(path, text, NULL);
g_free(file_list->selected);
file_list->selected = g_new(char, strlen(text)+1);
strcpy(file_list->selected, text);
set_file_selection(file_list);
- full = g_strconcat(path, filename, NULL);
- g_free(filename);
return full;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]