diff options
Diffstat (limited to 'src/plugins/fs/directory.c')
-rw-r--r-- | src/plugins/fs/directory.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/src/plugins/fs/directory.c b/src/plugins/fs/directory.c index c1c7b8cd..5524899c 100644 --- a/src/plugins/fs/directory.c +++ b/src/plugins/fs/directory.c | |||
@@ -94,8 +94,9 @@ on_open_menu_activate_fs (GtkWidget * dummy1, GtkWidget * dummy2) | |||
94 | if (dn == NULL) | 94 | if (dn == NULL) |
95 | return; | 95 | return; |
96 | if ((GNUNET_YES != GNUNET_disk_file_test (NULL, | 96 | if ((GNUNET_YES != GNUNET_disk_file_test (NULL, |
97 | dn)) || | 97 | dn)) || |
98 | (GNUNET_OK != GNUNET_disk_file_size (NULL, dn, &directory_data_len, GNUNET_YES))) | 98 | (GNUNET_OK != |
99 | GNUNET_disk_file_size (NULL, dn, &directory_data_len, GNUNET_YES))) | ||
99 | { | 100 | { |
100 | GNUNET_GTK_add_log_entry (_("Error accessing file `%s'."), dn); | 101 | GNUNET_GTK_add_log_entry (_("Error accessing file `%s'."), dn); |
101 | GNUNET_free (dn); | 102 | GNUNET_free (dn); |
@@ -112,7 +113,8 @@ on_open_menu_activate_fs (GtkWidget * dummy1, GtkWidget * dummy2) | |||
112 | directory_data = MMAP (NULL, dlen, PROT_READ, MAP_SHARED, fd, 0); | 113 | directory_data = MMAP (NULL, dlen, PROT_READ, MAP_SHARED, fd, 0); |
113 | if (directory_data == MAP_FAILED) | 114 | if (directory_data == MAP_FAILED) |
114 | { | 115 | { |
115 | GNUNET_GTK_add_log_entry (_("Error mapping file `%s' into memory."), dn); | 116 | GNUNET_GTK_add_log_entry (_("Error mapping file `%s' into memory."), |
117 | dn); | ||
116 | CLOSE (fd); | 118 | CLOSE (fd); |
117 | GNUNET_free (dn); | 119 | GNUNET_free (dn); |
118 | return; | 120 | return; |
@@ -124,7 +126,8 @@ on_open_menu_activate_fs (GtkWidget * dummy1, GtkWidget * dummy2) | |||
124 | list = fs_search_started (NULL, uri, 0, 0, NULL, GNUNET_FSUI_COMPLETED); | 126 | list = fs_search_started (NULL, uri, 0, 0, NULL, GNUNET_FSUI_COMPLETED); |
125 | GNUNET_ECRS_uri_destroy (uri); | 127 | GNUNET_ECRS_uri_destroy (uri); |
126 | GNUNET_ECRS_directory_list_contents (NULL, | 128 | GNUNET_ECRS_directory_list_contents (NULL, |
127 | directory_data, directory_data_len, &md, &spcb, list); | 129 | directory_data, directory_data_len, |
130 | &md, &spcb, list); | ||
128 | if (md != NULL) | 131 | if (md != NULL) |
129 | GNUNET_ECRS_meta_data_destroy (md); | 132 | GNUNET_ECRS_meta_data_destroy (md); |
130 | MUNMAP (directory_data, dlen); | 133 | MUNMAP (directory_data, dlen); |
@@ -133,17 +136,22 @@ on_open_menu_activate_fs (GtkWidget * dummy1, GtkWidget * dummy2) | |||
133 | 136 | ||
134 | /* switch view -- select directory */ | 137 | /* switch view -- select directory */ |
135 | notebook | 138 | notebook |
136 | = GTK_NOTEBOOK (glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "downloadNotebook")); | 139 | = |
140 | GTK_NOTEBOOK (glade_xml_get_widget | ||
141 | (GNUNET_GTK_get_main_glade_XML (), "downloadNotebook")); | ||
137 | gtk_notebook_set_current_page (notebook, | 142 | gtk_notebook_set_current_page (notebook, |
138 | gtk_notebook_page_num (notebook, | 143 | gtk_notebook_page_num (notebook, |
139 | list->searchpage)); | 144 | list->searchpage)); |
140 | 145 | ||
141 | notebook | 146 | notebook |
142 | = GTK_NOTEBOOK (glade_xml_get_widget (GNUNET_GTK_get_main_glade_XML (), "fsnotebook")); | 147 | = |
148 | GTK_NOTEBOOK (glade_xml_get_widget | ||
149 | (GNUNET_GTK_get_main_glade_XML (), "fsnotebook")); | ||
143 | gtk_notebook_set_current_page (notebook, | 150 | gtk_notebook_set_current_page (notebook, |
144 | gtk_notebook_page_num (notebook, | 151 | gtk_notebook_page_num (notebook, |
145 | glade_xml_get_widget | 152 | glade_xml_get_widget |
146 | (GNUNET_GTK_get_main_glade_XML (), | 153 | (GNUNET_GTK_get_main_glade_XML |
154 | (), | ||
147 | "fsdownloadvbox"))); | 155 | "fsdownloadvbox"))); |
148 | } | 156 | } |
149 | 157 | ||