diff options
author | Alan F <ajf@eth0.org.uk> | 2014-04-08 17:53:03 +0100 |
---|---|---|
committer | Alan F <ajf@eth0.org.uk> | 2014-04-08 17:53:03 +0100 |
commit | ec6a252a019e90ecc6825078ee7d79a24b82770f (patch) | |
tree | 0341fc787fdffa855e5d81e29023cad2181a99d7 /src | |
parent | f90a22358df1da6bafdc6783bade8b4202bdf212 (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.
Diffstat (limited to 'src')
-rw-r--r-- | src/trg-torrent-add-dialog.c | 4 |
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)) |