diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2011-09-08 18:45:12 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2011-09-08 18:45:12 +0000 |
commit | e8cf7cb598d2dcb8cba29ccbe89eaa8509b16e63 (patch) | |
tree | dd7fac7bc589320a5f6c3592e19a86f2444f72dc /src/trg-state-selector.c | |
parent | dc3a89ca0755edce2031d8e283d17bce18190da1 (diff) |
issue 71 - remove trailing slashes from directory names in combo box and state selector to avoid duplicates.
Diffstat (limited to 'src/trg-state-selector.c')
-rw-r--r-- | src/trg-state-selector.c | 4 |
1 files changed, 3 insertions, 1 deletions
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, |