aboutsummaryrefslogtreecommitdiff
path: root/src/fs/gnunet-fs-gtk_publish-dialog.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-02-22 18:35:30 +0000
committerChristian Grothoff <christian@grothoff.org>2012-02-22 18:35:30 +0000
commit7fd339523022aa439cdfa3203399606b30c63419 (patch)
tree5f69ecd8a35bf1627fb9c9eb806a8eb028669ac2 /src/fs/gnunet-fs-gtk_publish-dialog.c
parent37f86c4e707fe08309e49596c9f4ff4617347c0a (diff)
downloadgnunet-gtk-7fd339523022aa439cdfa3203399606b30c63419.tar.gz
gnunet-gtk-7fd339523022aa439cdfa3203399606b30c63419.zip
LRN: two directory patches change the way "is_directory" is evaluated.
Now it must be GNUNET_YES for the execution flow to switch to a branch where something is considered to be a directory. The reason for that is that some functions might return GNUNET_SYSERR when asked whether something is a directory or not. Checking this value as "!= GNUNET_NO" will produce positive result, even though it's not a directory.
Diffstat (limited to 'src/fs/gnunet-fs-gtk_publish-dialog.c')
-rw-r--r--src/fs/gnunet-fs-gtk_publish-dialog.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fs/gnunet-fs-gtk_publish-dialog.c b/src/fs/gnunet-fs-gtk_publish-dialog.c
index dd34cf88..9486d363 100644
--- a/src/fs/gnunet-fs-gtk_publish-dialog.c
+++ b/src/fs/gnunet-fs-gtk_publish-dialog.c
@@ -1023,7 +1023,7 @@ add_item (struct AddDirClientContext *adcc,
1023 path = gtk_tree_model_get_path (GTK_TREE_MODEL (ts), item_iter); 1023 path = gtk_tree_model_get_path (GTK_TREE_MODEL (ts), item_iter);
1024 row_reference = gtk_tree_row_reference_new (GTK_TREE_MODEL (ts), path); 1024 row_reference = gtk_tree_row_reference_new (GTK_TREE_MODEL (ts), path);
1025 gtk_tree_path_free (path); 1025 gtk_tree_path_free (path);
1026 if (item->is_directory) 1026 if (item->is_directory == GNUNET_YES)
1027 { 1027 {
1028 /* update meta data mime type (force to be GNUnet-directory) */ 1028 /* update meta data mime type (force to be GNUnet-directory) */
1029 if (NULL != item->meta) 1029 if (NULL != item->meta)
@@ -1088,7 +1088,7 @@ add_share_items_to_treestore (struct AddDirClientContext *adcc,
1088 { 1088 {
1089 add_item (adcc, ts, item, parent_iter, sibling_iter, &last_added); 1089 add_item (adcc, ts, item, parent_iter, sibling_iter, &last_added);
1090 sibling_iter = &last_added; 1090 sibling_iter = &last_added;
1091 if (item->is_directory) 1091 if (item->is_directory == GNUNET_YES)
1092 add_share_items_to_treestore (adcc, 1092 add_share_items_to_treestore (adcc,
1093 item->children_head, 1093 item->children_head,
1094 sibling_iter); 1094 sibling_iter);
@@ -1145,7 +1145,7 @@ directory_scan_cb (void *cls,
1145 last_pulse = GNUNET_TIME_absolute_get (); 1145 last_pulse = GNUNET_TIME_absolute_get ();
1146 } 1146 }
1147#if VERBOSE_PROGRESS 1147#if VERBOSE_PROGRESS
1148 if (is_directory) 1148 if (is_directory == GNUNET_YES)
1149 { 1149 {
1150 GNUNET_asprintf (&s, _("Scanning directory `%s'.\n"), filename); 1150 GNUNET_asprintf (&s, _("Scanning directory `%s'.\n"), filename);
1151 insert_progress_dialog_text (adcc, s); 1151 insert_progress_dialog_text (adcc, s);
@@ -1154,7 +1154,7 @@ directory_scan_cb (void *cls,
1154 else 1154 else
1155 adcc->total++; 1155 adcc->total++;
1156#else 1156#else
1157 if (! is_directory) 1157 if (is_directory != GNUNET_YES)
1158 adcc->total++; 1158 adcc->total++;
1159#endif 1159#endif
1160 break; 1160 break;