From ec6a252a019e90ecc6825078ee7d79a24b82770f Mon Sep 17 00:00:00 2001 From: Alan F Date: Tue, 8 Apr 2014 17:53:03 +0100 Subject: don't include directory nodes in the n_files count when populating the upload options treeview. this causes extra indexes to be sent to Transmission on upload, crashing it in some cases or failing the request. --- src/trg-torrent-add-dialog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/trg-torrent-add-dialog.c b/src/trg-torrent-add-dialog.c index e49a7cd..5b406d4 100644 --- a/src/trg-torrent-add-dialog.c +++ b/src/trg-torrent-add-dialog.c @@ -409,7 +409,9 @@ store_add_node(GtkTreeStore * store, GtkTreeIter * parent, 1, FC_INDEX, node->index, FC_PRIORITY, TR_PRI_NORMAL, FC_SIZE, node->length, -1); - *n_files = *n_files + 1; + + if (!node->children) + *n_files = *n_files + 1; } for (li = node->children; li; li = g_list_next(li)) -- cgit v1.2.3