aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs-gtk_event-handler.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/gnunet-fs-gtk_event-handler.c')
-rw-r--r--src/fs/gnunet-fs-gtk_event-handler.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/fs/gnunet-fs-gtk_event-handler.c b/src/fs/gnunet-fs-gtk_event-handler.c
index 86153ddc..5c0a5710 100644
--- a/src/fs/gnunet-fs-gtk_event-handler.c
+++ b/src/fs/gnunet-fs-gtk_event-handler.c
@@ -327,7 +327,6 @@ start_download (GtkTreeView *tree_view,
327 struct GNUNET_FS_Uri *uri; 327 struct GNUNET_FS_Uri *uri;
328 struct GNUNET_CONTAINER_MetaData *meta; 328 struct GNUNET_CONTAINER_MetaData *meta;
329 struct SearchResult *sr; 329 struct SearchResult *sr;
330 gchar *mime;
331 struct DownloadContext *dc; 330 struct DownloadContext *dc;
332 char *buf = NULL; 331 char *buf = NULL;
333 char *tmp; 332 char *tmp;
@@ -351,18 +350,16 @@ start_download (GtkTreeView *tree_view,
351 GNUNET_break (0); 350 GNUNET_break (0);
352 return; 351 return;
353 } 352 }
354 gtk_tree_model_get (tm, &iter, 0, &meta, 1, &uri, 9, &sr, 10, &mime, -1); 353 gtk_tree_model_get (tm, &iter, 0, &meta, 1, &uri, 9, &sr, -1);
355 if (NULL == uri) 354 if (NULL == uri)
356 { 355 {
357 /* user clicked on directory that was opened (not downloaded!), so we 356 /* user clicked on directory that was opened (not downloaded!), so we
358 have no URI and downloading makes no sense. Ignore! */ 357 have no URI and downloading makes no sense. Ignore! */
359 g_free (mime);
360 return; 358 return;
361 } 359 }
362 if (!(GNUNET_FS_uri_test_chk (uri) || GNUNET_FS_uri_test_loc (uri))) 360 if (!(GNUNET_FS_uri_test_chk (uri) || GNUNET_FS_uri_test_loc (uri)))
363 { 361 {
364 /* can only download chk/loc URIs, ignore */ 362 /* can only download chk/loc URIs, ignore */
365 g_free (mime);
366 return; 363 return;
367 } 364 }
368 365
@@ -419,7 +416,7 @@ start_download (GtkTreeView *tree_view,
419 /* now setup everything for the save-as dialog */ 416 /* now setup everything for the save-as dialog */
420 dc = GNUNET_malloc (sizeof (struct DownloadContext)); 417 dc = GNUNET_malloc (sizeof (struct DownloadContext));
421 dc->uri = GNUNET_FS_uri_dup (uri); 418 dc->uri = GNUNET_FS_uri_dup (uri);
422 dc->mime = mime; 419
423 dc->filename = buf; 420 dc->filename = buf;
424 dc->meta = GNUNET_CONTAINER_meta_data_duplicate (meta); 421 dc->meta = GNUNET_CONTAINER_meta_data_duplicate (meta);
425 dc->rr = gtk_tree_row_reference_new (tm, path); 422 dc->rr = gtk_tree_row_reference_new (tm, path);