From e8cf7cb598d2dcb8cba29ccbe89eaa8509b16e63 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Thu, 8 Sep 2011 18:45:12 +0000 Subject: issue 71 - remove trailing slashes from directory names in combo box and state selector to avoid duplicates. --- src/trg-state-selector.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/trg-state-selector.c') diff --git a/src/trg-state-selector.c b/src/trg-state-selector.c index eefb8db..6a2d37a 100644 --- a/src/trg-state-selector.c +++ b/src/trg-state-selector.c @@ -306,7 +306,9 @@ void trg_state_selector_update(TrgStateSelector * s) { } if (priv->showDirs) { - const gchar *dir = torrent_get_download_dir(t); + gchar *dir = g_strdup(torrent_get_download_dir(t)); + rm_trailing_slashes(dir); + result = g_hash_table_lookup(priv->directories, dir); if (result) { trg_state_selector_update_serial(model, -- cgit v1.2.3