Sophie

Sophie

distrib > Mandriva > 2007.1 > i586 > by-pkgid > a11d15185e5559aea840148fd31da440 > files > 3

gftp-2.0.18-9mdv2007.1.src.rpm

--- gftp-2.0.18/src/gtk/bookmarks.c~	2005-01-04 14:32:20.000000000 +0100
+++ gftp-2.0.18/src/gtk/bookmarks.c	2006-07-22 19:37:41.000000000 +0200
@@ -683,7 +683,6 @@
   oldpathlen = strlen (entry->path);
   if ((pos = strrchr (entry->path, '/')) != NULL)
     {
-      pos = entry->path;
       tempchar = *pos;
       *pos = '\0';
       newpath = gftp_build_path (NULL, entry->path, tempstr, NULL);
@@ -750,11 +749,14 @@
 
       while (tempentry != NULL)
 	{
-	  g_hash_table_remove (new_bookmarks_htable, tempentry->path);
-
-          bmentry = g_hash_table_lookup (gftp_bookmarks_htable,
+         bmentry = g_hash_table_lookup (gftp_bookmarks_htable,
                                          tempentry->path);
-          if (bmentry->oldpath == NULL)
+         if (bmentry == NULL)
+		bmentry = g_hash_table_lookup (new_bookmarks_htable,
+			       tempentry->path);
+
+	        g_hash_table_remove (new_bookmarks_htable, tempentry->path);	 
+	 if (bmentry->oldpath == NULL)
             bmentry->oldpath = tempentry->path;
           else
             g_free (tempentry->path);