summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alan F <ajf@eth0.org.uk>2014-04-08 17:53:03 +0100
committerGravatar Alan F <ajf@eth0.org.uk>2014-04-08 17:53:03 +0100
commitec6a252a019e90ecc6825078ee7d79a24b82770f (patch)
tree0341fc787fdffa855e5d81e29023cad2181a99d7
parentf90a22358df1da6bafdc6783bade8b4202bdf212 (diff)
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.
-rw-r--r--src/trg-torrent-add-dialog.c4
1 files changed, 3 insertions, 1 deletions
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))