diff options
Diffstat (limited to 'src/fs/gnunet-fs-gtk_publish-dialog.c')
-rw-r--r-- | src/fs/gnunet-fs-gtk_publish-dialog.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/fs/gnunet-fs-gtk_publish-dialog.c b/src/fs/gnunet-fs-gtk_publish-dialog.c index 00f7edf1..73acaf93 100644 --- a/src/fs/gnunet-fs-gtk_publish-dialog.c +++ b/src/fs/gnunet-fs-gtk_publish-dialog.c | |||
@@ -1012,6 +1012,7 @@ add_item (struct AddDirClientContext *adcc, | |||
1012 | GtkTreeRowReference *row_reference; | 1012 | GtkTreeRowReference *row_reference; |
1013 | GtkTreePath *path; | 1013 | GtkTreePath *path; |
1014 | struct stat sbuf; | 1014 | struct stat sbuf; |
1015 | uint64_t fsize; | ||
1015 | 1016 | ||
1016 | if (0 != stat (item->filename, | 1017 | if (0 != stat (item->filename, |
1017 | &sbuf)) | 1018 | &sbuf)) |
@@ -1019,6 +1020,10 @@ add_item (struct AddDirClientContext *adcc, | |||
1019 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "stat", item->filename); | 1020 | GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "stat", item->filename); |
1020 | return; | 1021 | return; |
1021 | } | 1022 | } |
1023 | |||
1024 | if ((item->is_directory != GNUNET_YES) && (GNUNET_OK != | ||
1025 | GNUNET_DISK_file_size (item->filename, &fsize, GNUNET_YES, GNUNET_YES))) | ||
1026 | return; | ||
1022 | gtk_tree_store_insert_after (ts, item_iter, parent, sibling); | 1027 | gtk_tree_store_insert_after (ts, item_iter, parent, sibling); |
1023 | path = gtk_tree_model_get_path (GTK_TREE_MODEL (ts), item_iter); | 1028 | 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); | 1029 | row_reference = gtk_tree_row_reference_new (GTK_TREE_MODEL (ts), path); |
@@ -1050,7 +1055,7 @@ add_item (struct AddDirClientContext *adcc, | |||
1050 | item->meta, | 1055 | item->meta, |
1051 | adcc->directory_scan_do_index, | 1056 | adcc->directory_scan_do_index, |
1052 | &adcc->directory_scan_bo); | 1057 | &adcc->directory_scan_bo); |
1053 | file_size_fancy = GNUNET_STRINGS_byte_size_fancy (sbuf.st_size); | 1058 | file_size_fancy = GNUNET_STRINGS_byte_size_fancy (fsize); |
1054 | } | 1059 | } |
1055 | gtk_tree_store_set (ts, item_iter, | 1060 | gtk_tree_store_set (ts, item_iter, |
1056 | 0, file_size_fancy, | 1061 | 0, file_size_fancy, |